Python SDK for TIDAS/ILCD Life Cycle Assessment data
Project description
TIDAS Python SDK
Type-safe Python tooling for working with ILCD/TIDAS life-cycle data. The SDK wraps the generated models with convenient factories, property accessors, and validation helpers so you can build rich LCA workflows in Python.
Status
- Version: 0.1.0 (preview)
- Distribution: install from source (PyPI release coming soon)
Prerequisites
- Python 3.12+
- uv for dependency management and scripted commands
Install viacurl -LsSf https://astral.sh/uv/install.sh | shif uv is not available.
Installation
cd sdks/python
uv sync --group dev # install core + development dependencies
Quick Start
Run the end-to-end sample to see the core features in action:
uv run python examples/usage.py
Minimal usage example:
from tidas_sdk import create_process
process = create_process({})
process.process_data_set.process_information.data_set_information.name.base_name.set_text(
"Sample Process", lang="en"
)
print(process.to_json())
Features in examples/usage.py
- JSON ➜ Object bootstrap:
create_process()builds aTidasProcessfrom complete or partial JSON payloads (creat_object_from_json()). - Object ➜ JSON round-trip:
to_json()returns the ILCD-compliant dictionary for downstream tooling (convert_object_to_json()). - Property access & localization: dotted attribute access plus
set_text()/get_text()helpers simplify multilingual fields (properties_access()). - IDE type hints: generated classes expose full type information for autocompletion (
type_hinting_and_autocompletion()). - On-demand validation: call
validate()only when your dataset is ready; inspect issues withlast_validation_error()(validation_on_demand()). - XML export:
to_xml()serializes to ILCD XML for interoperability (convert_to_xml()).
Development Workflow
# Install / update dependencies
uv sync --group dev
# Linting & formatting
uv run ruff check src
uv run ruff format src
# Type checking
uv run mypy src
# Tests
uv run pytest
Project Layout
src/tidas_sdk: Core implementation and generated modelsexamples/usage.py: Feature walkthrough used in this READMEscripts/: Utility scripts for code generation and maintenance
For questions or contributions, open an issue or pull request at https://github.com/tiangong-lca/tidas-sdk.
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 tidas_sdk-0.1.0.tar.gz.
File metadata
- Download URL: tidas_sdk-0.1.0.tar.gz
- Upload date:
- Size: 378.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
144d88cec42b0a76eaaa5888d86f434a402daaa7ee9ee93e1201270999fa8871
|
|
| MD5 |
d1b27755e4618873d51efe6a846b4b9d
|
|
| BLAKE2b-256 |
599017416cedf2043c776ef87dcd306eda2b8d002eeaf8d8655841b1571a5414
|
File details
Details for the file tidas_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tidas_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 409.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc40ef124fdfe6cdf5d43c83ba7198c265827583fdfec67c6f7bfe53294aad5f
|
|
| MD5 |
386529f76a66a4e85f6a6ca335f45c59
|
|
| BLAKE2b-256 |
689293772354aea9b7891e021b6cefd250e11878a786450aa1cebfe0475373f0
|