Skip to main content

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

ra_library-0.2.0.tar.gz (782.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ra_library-0.2.0-py3-none-any.whl (735.2 kB view details)

Uploaded Python 3

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

Hashes for ra_library-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6b7ad01d26b87de56341369cd044cc16ed0476b178f9f53ad1cf4cea7fa6a6d6
MD5 efea3c71d5990fe0350a8b5a30cc1612
BLAKE2b-256 093bcc5023b2236c21ae5c23d85551ddea3db881643480192f1ce8c32b3bdcee

See more details on using hashes here.

Provenance

The following attestation bundles were made for ra_library-0.2.0.tar.gz:

Publisher: publish.yml on Ameyanagi/ra-library

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ra_library-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d48aa2ed0249959c3090f39ec10a5b7871ebd1a0233ac72dcf86bdda7cb6b1fe
MD5 e00c101b8f18e4718c72b8a4aa2b0612
BLAKE2b-256 e28fd1ddf7a67453b44f088b5dbe8418e7e4b6c17c78f307132bda1bb60d6fa2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ra_library-0.2.0-py3-none-any.whl:

Publisher: publish.yml on Ameyanagi/ra-library

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page