RA Library
Chemical risk assessment library built from publicly documented methodology references.
Overview
This library implements an independent risk assessment workflow with detailed explanations, recommendations, and optional bundled SQLite reference data.
Features
- Verbose Calculations: Every step is explained with references
- What-If Analysis: Simulate different control measures
- Recommendation Engine: Prioritized risk reduction actions
- Limitation Transparency: Explains when Level I is impossible
Installation
pip install ra-library
uv add ra-library
Usage
from ra_library import AssessmentInput, Substance
from ra_library.calculators import calculate_inhalation_risk
# Create assessment input
input = AssessmentInput(
title="Toluene handling",
product_property=PropertyType.LIQUID,
amount_level=AmountLevel.MEDIUM,
ventilation=VentilationLevel.INDUSTRIAL,
)
# Calculate risk
result = calculate_inhalation_risk(input, substance)
print(f"Risk Level: {result.risk_level.name}")
print(f"RCR: {result.rcr:.4f}")
Development
uv sync --group dev
uv run pre-commit install
uv run pre-commit run --all-files
uv run pytest -q
Release
PyPI publishing is handled by GitHub Actions only when a matching v* tag is
pushed. See docs/release.md for the cleanup and release
checklist.
Notes
- The packaged reference data is bundled as SQLite databases, not the original source workbook files.
- This is an independent implementation and is not an official MHLW distribution.
- Public methodology documents may be cited for interoperability and validation, but official workbook assets are not redistributed here.
References
- Public CREATE-SIMPLE design and manual documents
- HSE COSHH Essentials
- ECETOC TRA
- Potts-Guy Equation for dermal absorption
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 ra_library-0.2.0.tar.gz.
File metadata
- Download URL: ra_library-0.2.0.tar.gz
- Upload date:
- Size: 782.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b7ad01d26b87de56341369cd044cc16ed0476b178f9f53ad1cf4cea7fa6a6d6
|
|
| MD5 |
efea3c71d5990fe0350a8b5a30cc1612
|
|
| BLAKE2b-256 |
093bcc5023b2236c21ae5c23d85551ddea3db881643480192f1ce8c32b3bdcee
|
Provenance
The following attestation bundles were made for ra_library-0.2.0.tar.gz:
Publisher:
publish.yml on Ameyanagi/ra-library
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ra_library-0.2.0.tar.gz -
Subject digest:
6b7ad01d26b87de56341369cd044cc16ed0476b178f9f53ad1cf4cea7fa6a6d6 - Sigstore transparency entry: 2226254303
- Sigstore integration time:
-
Permalink:
Ameyanagi/ra-library@e874f4c4e8c2d5ce8c703aba1780f72c85c2a1b9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Ameyanagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e874f4c4e8c2d5ce8c703aba1780f72c85c2a1b9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ra_library-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ra_library-0.2.0-py3-none-any.whl
- Upload date:
- Size: 735.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d48aa2ed0249959c3090f39ec10a5b7871ebd1a0233ac72dcf86bdda7cb6b1fe
|
|
| MD5 |
e00c101b8f18e4718c72b8a4aa2b0612
|
|
| BLAKE2b-256 |
e28fd1ddf7a67453b44f088b5dbe8418e7e4b6c17c78f307132bda1bb60d6fa2
|
Provenance
The following attestation bundles were made for ra_library-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Ameyanagi/ra-library
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ra_library-0.2.0-py3-none-any.whl -
Subject digest:
d48aa2ed0249959c3090f39ec10a5b7871ebd1a0233ac72dcf86bdda7cb6b1fe - Sigstore transparency entry: 2226254422
- Sigstore integration time:
-
Permalink:
Ameyanagi/ra-library@e874f4c4e8c2d5ce8c703aba1780f72c85c2a1b9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Ameyanagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e874f4c4e8c2d5ce8c703aba1780f72c85c2a1b9 -
Trigger Event:
push
-
Statement type: