Adapter layer for .rost — converts any data source to canonical JSON
Project description
rost-io — Adapter layer for .rost
rost-io converts messy real-world data sources into the canonical JSON
contracts that the .rost compiler and solver consume.
Design principle
The .rost compiler only reads canonical JSON. It has no database drivers,
no Excel parser, no API calls. rost-io is the adapter layer that handles
all of that — exactly as described in DATA_IO.md (Hexagonal Architecture).
Excel / CSV / Parquet / PostgreSQL / MySQL / PDF
│
▼
rost-io adapter ← this package
│
│ staff.json (schema: rost/staff/v1)
│ leave.json (schema: rost/leave/v1)
│ calendar.json (schema: rost/calendar/v1)
▼
rostc compiler → solver → solution.json
Installation
# Core only (CSV + JSON — no extra dependencies)
pip install rost-io
# With Parquet support (P1)
pip install "rost-io[parquet]"
# With database support — PostgreSQL + MySQL (P1)
pip install "rost-io[db]"
# With Excel support (P2)
pip install "rost-io[excel]"
# With pandas support (P2)
pip install "rost-io[pandas]"
# Everything
pip install "rost-io[all]"
Quick start
from rost_io import CsvAdapter, validate_staff
# Convert a CSV staff export to canonical staff.json
adapter = CsvAdapter("hr_export.csv", id_col="employee_id", tags_col="roles")
staff_json = adapter.to_staff_json()
# Validate against the canonical schema
validate_staff(staff_json) # raises jsonschema.ValidationError if invalid
# Write for the compiler
import json
with open("staff.json", "w") as f:
json.dump(staff_json, f, indent=2)
Canonical JSON schemas
| File | Schema ID | Description |
|---|---|---|
staff.json |
rost/staff/v1 |
People + tags |
leave.json |
rost/leave/v1 |
Leave/absence entries |
calendar.json |
rost/calendar/v1 |
Date range + public holidays |
solution.json |
rost/solution/v1 |
Solver output (read-only for rost-io) |
Adapters
| Adapter | Priority | Extra dep |
|---|---|---|
CsvAdapter |
P0 | none (stdlib) |
JsonAdapter |
P0 | none |
ParquetAdapter |
P1 | pyarrow |
DatabaseAdapter |
P1 | sqlalchemy |
ExcelAdapter |
P2 | openpyxl |
PandasAdapter |
P2 | pandas |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rost_io-0.1.0.tar.gz.
File metadata
- Download URL: rost_io-0.1.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfe011662e02c02c62dd7ce549a6ef2baeedb07598dae801c3140b5e9ad470e2
|
|
| MD5 |
a2a852d70fa8530ce01845a53a0f0751
|
|
| BLAKE2b-256 |
ead943b24f8476f7d91816822ee8ef4c1ba2c7c246c02eb2f2f5304afed1189b
|
Provenance
The following attestation bundles were made for rost_io-0.1.0.tar.gz:
Publisher:
release.yml on Bpi031/rost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rost_io-0.1.0.tar.gz -
Subject digest:
bfe011662e02c02c62dd7ce549a6ef2baeedb07598dae801c3140b5e9ad470e2 - Sigstore transparency entry: 1448631091
- Sigstore integration time:
-
Permalink:
Bpi031/rost@d33eeec7ab0982cf92a57dc8eb19515770727e89 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Bpi031
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d33eeec7ab0982cf92a57dc8eb19515770727e89 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rost_io-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rost_io-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f57aea533762c07428091677ab5680a44fad2897364d784fd6a3fef1c7bff32d
|
|
| MD5 |
bc9a579a57a2e2c72aa7d2099beaac49
|
|
| BLAKE2b-256 |
657f4d5c379b612c8866a8da165f7018bdf5bddc5a31a11e1496f1f10500480d
|
Provenance
The following attestation bundles were made for rost_io-0.1.0-py3-none-any.whl:
Publisher:
release.yml on Bpi031/rost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rost_io-0.1.0-py3-none-any.whl -
Subject digest:
f57aea533762c07428091677ab5680a44fad2897364d784fd6a3fef1c7bff32d - Sigstore transparency entry: 1448631192
- Sigstore integration time:
-
Permalink:
Bpi031/rost@d33eeec7ab0982cf92a57dc8eb19515770727e89 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Bpi031
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d33eeec7ab0982cf92a57dc8eb19515770727e89 -
Trigger Event:
push
-
Statement type: