# s4int/robotframework-csvlibrary architecture

> Architecture diagram of the GitHub repository s4int/robotframework-csvlibrary, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/s4int/robotframework-csvlibrary
- Repository: https://github.com/s4int/robotframework-csvlibrary

## Overview

CSVLibrary is a small Robot Framework keyword library for reading, appending, and creating CSV data as files or strings. Robot Framework invokes the public keywords; file operations use shared CSV parsing or writing helpers, while string operations work with in-memory streams. The sampled implementation supports list and associative/dictionary forms, including headers and selected-line reads. The README demonstrates file-reading keywords; other keyword entry points and helper calls are shown in the sampled source.

Main entry points: [`CSVLibrary/__init__.py`](https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py) (Shared reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_robot(("Robot Framework"))
node_read_file["Read CSV file<br/>[__init__.py]"]
node_read_string["Read CSV string<br/>[__init__.py]"]
node_read_assoc["Associative reads<br/>[__init__.py]"]
node_append_file["Append CSV file<br/>[__init__.py]"]
node_append_string["Append CSV string<br/>[__init__.py]"]
node_create_file["Create CSV file<br/>[__init__.py]"]
node_create_string["Create CSV string<br/>[__init__.py]"]
node_reader["Shared reader<br/>[__init__.py]"]
node_writer["Shared writer<br/>[__init__.py]"]
node_csv_file["CSV file"]
node_csv_text["CSV text"]

node_robot -->|"invokes"| node_read_file
node_robot -->|"invokes"| node_read_assoc
node_read_file -->|"delegates"| node_reader
node_read_string -->|"delegates"| node_reader
node_read_assoc -->|"delegates"| node_reader
node_append_file -->|"reads header"| node_reader
node_append_file -->|"writes rows"| node_writer
node_append_string -->|"reads header"| node_reader
node_append_string -->|"writes rows"| node_writer
node_create_file -->|"writes rows"| node_writer
node_create_string -->|"writes rows"| node_writer
node_read_file -->|"reads"| node_csv_file
node_append_file -->|"reads and appends"| node_csv_file
node_create_file -->|"writes"| node_csv_file
node_read_string -->|"parses"| node_csv_text
node_append_string -->|"extends"| node_csv_text
node_create_string -->|"produces"| node_csv_text

click node_read_file "https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py"
click node_read_string "https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py"
click node_read_assoc "https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py"
click node_append_file "https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py"
click node_append_string "https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py"
click node_create_file "https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py"
click node_create_string "https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py"
click node_reader "https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py"
click node_writer "https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_robot,node_csv_file,node_csv_text toneIndigo
class node_read_file,node_read_string,node_read_assoc,node_append_file,node_append_string,node_create_file,node_create_string,node_reader,node_writer toneTeal
```

## Components

### Other components

- **Robot Framework**
- [Read CSV file](https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py): `CSVLibrary/__init__.py`
- [Read CSV string](https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py): `CSVLibrary/__init__.py`
- [Associative reads](https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py): `CSVLibrary/__init__.py`
- [Append CSV file](https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py): `CSVLibrary/__init__.py`
- [Append CSV string](https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py): `CSVLibrary/__init__.py`
- [Create CSV file](https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py): `CSVLibrary/__init__.py`
- [Create CSV string](https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py): `CSVLibrary/__init__.py`
- [Shared reader](https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py): `CSVLibrary/__init__.py`
- [Shared writer](https://github.com/s4int/robotframework-csvlibrary/blob/master/CSVLibrary/__init__.py): `CSVLibrary/__init__.py`
- **CSV file**
- **CSV text**

## Connections

- Robot Framework → Read CSV file: invokes (evidence: `README.md`)
- Robot Framework → Associative reads: invokes (evidence: `README.md`)
- Read CSV file → Shared reader: delegates (evidence: `CSVLibrary/__init__.py`)
- Read CSV string → Shared reader: delegates (evidence: `CSVLibrary/__init__.py`)
- Associative reads → Shared reader: delegates (evidence: `CSVLibrary/__init__.py`)
- Append CSV file → Shared reader: reads header (evidence: `CSVLibrary/__init__.py`)
- Append CSV file → Shared writer: writes rows (evidence: `CSVLibrary/__init__.py`)
- Append CSV string → Shared reader: reads header (evidence: `CSVLibrary/__init__.py`)
- Append CSV string → Shared writer: writes rows (evidence: `CSVLibrary/__init__.py`)
- Create CSV file → Shared writer: writes rows (evidence: `CSVLibrary/__init__.py`)
- Create CSV string → Shared writer: writes rows (evidence: `CSVLibrary/__init__.py`)
- Read CSV file → CSV file: reads (evidence: `CSVLibrary/__init__.py`)
- Append CSV file → CSV file: reads and appends (evidence: `CSVLibrary/__init__.py`)
- Create CSV file → CSV file: writes (evidence: `CSVLibrary/__init__.py`)
- Read CSV string → CSV text: parses (evidence: `CSVLibrary/__init__.py`)
- Append CSV string → CSV text: extends (evidence: `CSVLibrary/__init__.py`)
- Create CSV string → CSV text: produces (evidence: `CSVLibrary/__init__.py`)
