Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

RobotFramework Table Library

Statistics

Latest Build Status -  Branch Latest Build Status - Default Branch PyPI - Version PyPI - Python Version PyPI Downloads - Total PyPI Downloads - Monthly

Keyword Documentation

Here you can find the Keyword Documentation generated by libdoc.

📊 RobotFramework TableLibrary

TableLibrary is a Robot Framework library designed for easy handling of tabular data formats such as CSV, Excel, Parquet, and more.
It provides a unified interface for reading, modifying, and creating tables directly within your Robot Framework tests.

🔍 Key Features

  • Read Tables

    • Supports formats like .csv, .xlsx, .xls, .parquet, .json, .txt (as csv), and more.
    • Access table contents by column name or index.
    • Verifying specific table cells, columns or rows & executing assertions using the robotframework-assertion-engine
  • Modify Existing Tables

    • Add, remove, or update rows and columns.
    • Apply dynamic modifications during test execution.
  • Create New Tables

    • Create tables from lists, dictionaries, or other data sources.
    • Export tables to multiple file formats (e.g., CSV, Excel, Parquet).
    • Easily generate structured test data in the given file format.

Exception: Excel File Handling

We have included a basic handling of Excel files, but for more complex excel features, please take a look at the following library: robotframework-excelsage

This library got especially written to work with more complex Excel features like e.g. Excel Sheets, etc...

Installation

You can install the library using the following command:

pip install robotframework-tablelibrary

Example

File Format - CSV

# Reading CSV file with header column
${content} =    Tables.Read Table    ${CURDIR}${/}testdata${/}example_01.csv
${result} =    BuiltIn.Evaluate    "${content}[0][0]" == "index"
BuiltIn.Should Be True    ${result}
# Reading CSV file without header column
Tables.Configure Ignore Header    True
${content} =    Tables.Read Table    ${CURDIR}${/}testdata${/}example_01.csv
${result} =    BuiltIn.Evaluate    "index" not in "${content}"
BuiltIn.Should Be True    ${result}

Missing values

Missing values are returned using pandas' default values by default. To return parsed missing values as Python None in list, dictionary, cell, row, and column results, enable the setting. This includes pandas missing-value types such as NaN, pd.NA, and NaT, as well as values recognized as missing by the active parser, such as N/A and NULL:

Tables.Configure Missing As None    True
${content} =    Tables.Read Table    ${CURDIR}${/}testdata${/}example_01.csv

DataFrame results and the library's internal DataFrames are not changed by this setting.

File Format - Parquet

${content} =    Tables.Read Table    ${CURDIR}${/}testdata${/}example_05.parquet
${result} =    BuiltIn.Evaluate    "${content}[0][0]" == "_time"
BuiltIn.Should Be True    ${result}

Create new empty table - don't save to file system

# Create some data which should be inserted into the new table
VAR    @{headers} =    name    age
VAR    @{person1} =    Michael    34
VAR    @{person2} =    John    19

# Create empty table object - internally in cache
${uuid} =    Tables.Create Table    headers=${headers}

# Append some rows
Tables.Append Row    ${person1}
Tables.Append Row    ${person2}
Count Table    ${uuid}    Rows    equal    ${3}

# Append a column
VAR    @{column1} =    city    MG    ERL
Tables.Append Column    ${column1}
Count Table    ${uuid}    Columns    equal    ${3}

# Optional: Set new table cell value
Get Table Cell    1    1    equals    34
Tables.Set Table Cell    25    0    1
Get Table Cell    1    1    equals    25

# Insert a new row into the existing table object
VAR    @{insert_row} =    Lu    26    Hamburg
Insert Row    ${insert_row}    0
Get Table Cell    1    0    equals    Lu
Count Table    ${uuid}    Rows    equal    ${4}

Create new empty table - save to file system

# Generate new headers which should be used in the table
VAR    @{headers} =    name    age

# Create new table object
${uuid} =    Create Table    ${headers}

# Generate some random data & append as rows to new table
FOR    ${_}    IN RANGE    ${100}
    ${a} =    Generate Random String
    ${b} =    Generate Random String
    VAR    @{data}    ${a}    ${b}
    Tables.Append Row    ${data}
END

# Ensure that data got written into internal table object
Count Table    ${uuid}    Rows    equals    ${101}

# Write table to specific file path -> write from cache into persistant file
Write Table    ${uuid}    ${CURDIR}/results/test_writer_new_table.csv

# Check table content again, but now read table from file path!
Count Table    ${CURDIR}/results/test_writer_new_table.csv    Rows    equals    ${101}

Contribution & Development

See Development.md for more information about contributing & developing this library.

License

robotframework-tablelibrary is distributed under the terms of the Apache License 2.0 license.

Metadata

Release files for robotframework-tablelibrary 0.5.1rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robotframework-tablelibrary 0.5.1rc1
File Size Uploaded Provenance Actions
robotframework_tablelibrary-0.5.1rc1.tar.gz 257.4 kB Without provenance Details for robotframework_tablelibrary-0.5.1rc1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-tablelibrary 0.5.1rc1
File Interpreter ABI Platform Actions
robotframework_tablelibrary-0.5.1rc1-py3-none-any.whl Python 3 none any Details for robotframework_tablelibrary-0.5.1rc1-py3-none-any.whl

Total release size: 296.1 kB

Release files / robotframework_tablelibrary-0.5.1rc1.tar.gz

Download URL robotframework_tablelibrary-0.5.1rc1.tar.gz
Size 257.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d7acf7b506b9498435777f164b2d33753d493b86d8f0c1943576fbf8141d0c7e
BLAKE2b-256 checksum
How to use checksums
8c297809ad0eb12aebed2e63a0337013288688f5be28e7b65b0c57b0623a1035
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / robotframework_tablelibrary-0.5.1rc1-py3-none-any.whl

Download URL robotframework_tablelibrary-0.5.1rc1-py3-none-any.whl
Size 38.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd7a51e0e553f92d7f045ccc2acbbcb76454b78b7ee1412fdbcc3c6b7746d3b0
BLAKE2b-256 checksum
How to use checksums
eb3f8c515a3e4b055bab285e0602ca16ecca06e643bf240b100e355e108d9d21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for robotframework-tablelibrary 0.5.1rc1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page