Skip to main content

Search Chemical Abstracts Service Registry Numbers (CASRNs) from the EPA Substance Registry Services (SRS) database.

Project description

casquery

ci/cd

Query the EPA Substance Registry Service (SRS) using CAS Registry Numbers (CASRN).

casquery provides:

  • A command-line tool for searching CASRN records
  • Normalization of messy CAS numbers
  • CAS resolution (superseded → current CASRN)
  • Batch processing of CSVs
  • Multiple output formats (table, JSON, XML, CSV)

It works both as:

  • A standalone script (python casquery.py)
  • A PyPI-installable CLI (casquery …)

Installation

pip install casquery

Standalone Script Usage

You can also run it directly as a script without installing:

python casquery.py --help

Command Line Usage

# Help
casquery --help
casquery search --help

# Search EPA SRS
casquery search 375-73-5 29420-43-3

# Search with synonyms
casquery search --synonyms 375-73-5

# Output formats
casquery search 375-73-5 --format json
casquery search 375-73-5 --format xml
casquery search 375-73-5 --format csv

# Normalize CAS numbers
casquery normalize 1234567
# → 1234-56-7

# Resolve superseded CAS numbers
casquery resolve 29420-43-3

# Batch-process a CSV (Input CSV must contain a column of CASRN values.)
casquery batch input.csv --column analyte_cas --output cleaned.csv

Examples

Search for two CAS numbers

casquery search 7440-66-6 7440097

╭───────────────────────────────────────────────╮
│        EPA SRS CASRN Search Results           │
╰───────────────────────────────────────────────╯
cas_rn     systematicName     epaName     currentCasNumber
---------  ------------------  ----------  -----------------
7440-66-6  Zinc                Zinc        7440-66-6
7440-09-7  Potassium           Potassium   7440-09-7

Output JSON instead of a table

casquery search --format json 375-73-5

[
  {
    "cas_rn": "375-73-5",
    "systematicName": "Perfluorobutane sulfonic acid",
    "epaName": "PFBS",
    "currentCasNumber": "375-73-5"
  }
]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

casquery-0.2.2.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

casquery-0.2.2-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file casquery-0.2.2.tar.gz.

File metadata

  • Download URL: casquery-0.2.2.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for casquery-0.2.2.tar.gz
Algorithm Hash digest
SHA256 122e5a0701c8e45bb12fc8738680232c1f9d2ee1359ae65f5f02636107754e18
MD5 832c067368ac2b99951ccb61d3cbd7f6
BLAKE2b-256 3ba6df0c8523ab23baec0fcdb929cc8a5d18a6723967bc0d2d1cbafcb61a6b71

See more details on using hashes here.

Provenance

The following attestation bundles were made for casquery-0.2.2.tar.gz:

Publisher: ci-cd.yaml on geocoug/casquery

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

File details

Details for the file casquery-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: casquery-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for casquery-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f15cd3a091173239c7fdf461e637a9d44f2c2eb5f2a66da3556bb18e223d1b77
MD5 d38e4b8b0f3c57816c7c8001fab04c2a
BLAKE2b-256 e170b1a30aca1e090c954ef8d1c98a9cd965c77dc344c03e53b7ff0dc62538f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for casquery-0.2.2-py3-none-any.whl:

Publisher: ci-cd.yaml on geocoug/casquery

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