Search Chemical Abstracts Service Registry Numbers (CASRNs) from the EPA Substance Registry Services (SRS) database.
Project description
casquery
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
# From PyPI
pip install casquery
# Or pip install git+
pip install "git+https://github.com/geocoug/casquery.git"
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 7440-66-6 7440-09-7
[
{
"cas_rn": "7440-09-7",
"systematicName": "Potassium",
"epaName": "Potassium",
"currentCasNumber": "7440-09-7"
},
{
"cas_rn": "7440-66-6",
"systematicName": "Zinc",
"epaName": "Zinc",
"currentCasNumber": "7440-66-6"
}
]
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
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 casquery-0.2.3.tar.gz.
File metadata
- Download URL: casquery-0.2.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c933712dacdea6b3530b5529ebef2bc6fb27258e9a2b14198a646e43dc81b17
|
|
| MD5 |
378eec0b325e870542d360414c202cbc
|
|
| BLAKE2b-256 |
0250ad993e1ad63cce2dba55e922f88eebcccb29717bf4fa1f35637e20788b77
|
Provenance
The following attestation bundles were made for casquery-0.2.3.tar.gz:
Publisher:
ci-cd.yaml on geocoug/casquery
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
casquery-0.2.3.tar.gz -
Subject digest:
3c933712dacdea6b3530b5529ebef2bc6fb27258e9a2b14198a646e43dc81b17 - Sigstore transparency entry: 710009752
- Sigstore integration time:
-
Permalink:
geocoug/casquery@a820026f64f96d33e9149816b89755d4433aa811 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/geocoug
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yaml@a820026f64f96d33e9149816b89755d4433aa811 -
Trigger Event:
push
-
Statement type:
File details
Details for the file casquery-0.2.3-py3-none-any.whl.
File metadata
- Download URL: casquery-0.2.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87cad32a4f600416ea2a656d0f1a00420d82ac6ccb313602ee517aa8c3fe2d73
|
|
| MD5 |
06c3905f22f08ed426ef4f1d550558f4
|
|
| BLAKE2b-256 |
f9671404d322e2b7d4c7471e0e092a48555916bf94e1b71424013f44d7b0ada0
|
Provenance
The following attestation bundles were made for casquery-0.2.3-py3-none-any.whl:
Publisher:
ci-cd.yaml on geocoug/casquery
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
casquery-0.2.3-py3-none-any.whl -
Subject digest:
87cad32a4f600416ea2a656d0f1a00420d82ac6ccb313602ee517aa8c3fe2d73 - Sigstore transparency entry: 710009755
- Sigstore integration time:
-
Permalink:
geocoug/casquery@a820026f64f96d33e9149816b89755d4433aa811 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/geocoug
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yaml@a820026f64f96d33e9149816b89755d4433aa811 -
Trigger Event:
push
-
Statement type: