Skip to main content

RA Library

RA Suite logo

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

Release files for ra-library 0.3.0

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

Source distribution (sdist)

Source distribution for ra-library 0.3.0
File Size Uploaded
ra_library-0.3.0.tar.gz 975.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ra-library 0.3.0
File Interpreter ABI Platform
ra_library-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.7 MB

Release files / ra_library-0.3.0.tar.gz

Download URL ra_library-0.3.0.tar.gz
Size 975.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e081edbe1f31b7bf419af47a8f5f4a78cfdd67e48ebca89375d188989cd8e494
BLAKE2b-256 checksum
How to use checksums
bbc407c32caeac02f5cc2c6f695a438f0cecae89374531baaee7203365300669
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / ra_library-0.3.0-py3-none-any.whl

Download URL ra_library-0.3.0-py3-none-any.whl
Size 736.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b843a28ddc6528247c6b21fc5eb0f535b29d7de5dc1f1c2ad339d040f32d27a
BLAKE2b-256 checksum
How to use checksums
357d9207404dfddb694c04876a26020cc0711353baa7a0befaacf2f9dde3058a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.1

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

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