Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeroune/robotframework-csvlib
CSV library for robotframework written in Python 3
https://github.com/zeroune/robotframework-csvlib
csv python python3 robotframework
Last synced: 3 months ago
JSON representation
CSV library for robotframework written in Python 3
- Host: GitHub
- URL: https://github.com/zeroune/robotframework-csvlib
- Owner: Zeroune
- License: mit
- Created: 2018-10-04T16:24:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-15T08:33:35.000Z (over 4 years ago)
- Last Synced: 2024-10-13T08:42:30.802Z (3 months ago)
- Topics: csv, python, python3, robotframework
- Language: Python
- Size: 10.7 KB
- Stars: 2
- Watchers: 0
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# robotframework-csvlib
CSV library for robotframework written in Python 3## Installation
```
pip install robotframework-csvlib
```## Quick Keyword Overview
```
Read CSV As Single List
Arguments:
Filepath
Delimiter (optional)
Returns:
A single list with all values.
```
```
Read CSV As List
Arguments:
Filepath
Delimiter (optional)
Returns:
A list containing all rows as lists.
```
```
Read CSV As Dictionary
Arguments:
Filepath
Name of key column
Name(s) of value column(s)
Delimiter (optional)
Returns:
A dictionary with the key column a key and the value column(s) as value.
If there are multiple value columns the value will be a list containing all values.
```### Example
```
*** Settings ***
Library CSVLib*** Test Cases ***
Test CSV
${singlelist}= Read CSV As Single List test.csv
log to console ${singlelist}${list}= read csv as list test.csv
log to console ${list}${dict}= read csv as dictionary test_dict.csv Animal Legs ,
log to console ${dict}${value}= create list Legs Eyes
${dictWList}= read csv as dictionary test_dict1.csv Animal ${value} ,
log to console ${dictWList}
```