Skip to main content

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.1.0.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

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

cas_python-0.1.0-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file cas_python-0.1.0.tar.gz.

File metadata

  • Download URL: cas_python-0.1.0.tar.gz
  • Upload date:
  • Size: 31.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for cas_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6085d224d9a3231833f7edea4f2d47950bb18e8233da46a7c1134f18e3b711ed
MD5 9bf5b3d9bf39b0afc59b0f45f7f666e7
BLAKE2b-256 50608b5dbc12579a627a7338e0eecaa1f963366d3e345bbe72ed67cd0f80f557

See more details on using hashes here.

File details

Details for the file cas_python-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cas_python-0.1.0-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

Hashes for cas_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a323c72e8adb0e6e15472460a562c798e1c94811aa349f76ec7182963a94fe8
MD5 8d2af486e02b68f336d4172793645590
BLAKE2b-256 7044143db370bdb35f188c065e0418c42716cc54e6c2703bffe0bd44106673f4

See more details on using hashes here.

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