Database of CAS Registry Number for Python
Project description
cas-python
cas-python is a Python library that provides access to a database of CAS Registry Numbers, allowing easy retrieval of chemical information by CAS number, chemical formula, or name.
Installation
Use the package manager pip to install cas-python.
pip install cas-python
Usage
>>> import cas
>>> # Get entry by CAS number
>>> cas.database.get(cas="7732-18-5")
CASEntry(cas='7732-18-5', name='water', formula='H2O')
>>> # Get entry by chemical formula
>>> cas.database.get(formula="H2O")
CASEntry(cas='7732-18-5', name='water', formula='H2O')
>>> # Get entry by chemical name
>>> cas.database.get(name="water")
CASEntry(cas='7732-18-5', name='water', formula='H2O')
>>> # Explore the retrieved entry
>>> gold = cas.database.get(name="gold")
>>> gold
CASEntry(cas='7440-57-5', name='gold', formula='Au')
>>> # Access specific attributes of the entry
>>> gold.cas
'7440-57-5'
>>> gold.formula
'Au'
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
cas_python-0.0.5.tar.gz
(30.9 kB
view details)
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 cas_python-0.0.5.tar.gz.
File metadata
- Download URL: cas_python-0.0.5.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abfb7f59fb278f376e263c14acc4ae6e6f29967488f186d2cd6834a3e25213d6
|
|
| MD5 |
6c29deda9ad4b300b8c3aedfbff0d48a
|
|
| BLAKE2b-256 |
7783a837d1e3c52fbcbfd82d3590ce389f76da917ba7d7a03c02bde06655b5ad
|
File details
Details for the file cas_python-0.0.5-py3-none-any.whl.
File metadata
- Download URL: cas_python-0.0.5-py3-none-any.whl
- Upload date:
- Size: 31.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8867f9103a6846279abe77f554a72dc99d95f3567efba129a4bbf25e660af9c
|
|
| MD5 |
86c90c6cdaa2a80a2e82928887833aff
|
|
| BLAKE2b-256 |
58afe0e72621662e53544e3ad7bbf1dc047d8f7098c7b9a31b4bd41213c2ef84
|