cas-python


Namecas-python JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryDatabase of CAS Registry Number for Python
upload_time2024-09-09 16:26:26
maintainerAntonio Silva
docs_urlNone
authorAntonio Silva
requires_python>=3.6
licenseNone
keywords cas registry chemical abstracts service database formula
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://pip.pypa.io/en/stable/) to install cas-python.

```bash
pip install cas-python
```

## Usage

```python
>>> 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'
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cas-python",
    "maintainer": "Antonio Silva",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "cas, registry, chemical, abstracts, service, database, formula",
    "author": "Antonio Silva",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/50/60/8b5dbc12579a627a7338e0eecaa1f963366d3e345bbe72ed67cd0f80f557/cas_python-0.1.0.tar.gz",
    "platform": null,
    "description": "# cas-python\n\ncas-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.\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install cas-python.\n\n```bash\npip install cas-python\n```\n\n## Usage\n\n```python\n>>> import cas\n\n>>> # Get entry by CAS number\n>>> cas.database.get(cas=\"7732-18-5\")\nCASEntry(cas='7732-18-5', name='water', formula='H2O')\n\n>>> # Get entry by chemical formula\n>>> cas.database.get(formula=\"H2O\")\nCASEntry(cas='7732-18-5', name='water', formula='H2O')\n\n>>> # Get entry by chemical name\n>>> cas.database.get(name=\"water\")\nCASEntry(cas='7732-18-5', name='water', formula='H2O')\n\n>>> # Explore the retrieved entry\n>>> gold = cas.database.get(name=\"gold\")\n>>> gold\nCASEntry(cas='7440-57-5', name='gold', formula='Au')\n\n>>> # Access specific attributes of the entry\n>>> gold.cas\n'7440-57-5'\n>>> gold.formula\n'Au'\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Database of CAS Registry Number for Python",
    "version": "0.1.0",
    "project_urls": {
        "Bug Reports": "https://github.com/asergios/cas-python/issues",
        "Homepage": "https://github.com/asergios/cas-python",
        "Source": "https://github.com/asergios/cas-python/"
    },
    "split_keywords": [
        "cas",
        " registry",
        " chemical",
        " abstracts",
        " service",
        " database",
        " formula"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7044143db370bdb35f188c065e0418c42716cc54e6c2703bffe0bd44106673f4",
                "md5": "8d2af486e02b68f336d4172793645590",
                "sha256": "1a323c72e8adb0e6e15472460a562c798e1c94811aa349f76ec7182963a94fe8"
            },
            "downloads": -1,
            "filename": "cas_python-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8d2af486e02b68f336d4172793645590",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 31585,
            "upload_time": "2024-09-09T16:26:24",
            "upload_time_iso_8601": "2024-09-09T16:26:24.882591Z",
            "url": "https://files.pythonhosted.org/packages/70/44/143db370bdb35f188c065e0418c42716cc54e6c2703bffe0bd44106673f4/cas_python-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "50608b5dbc12579a627a7338e0eecaa1f963366d3e345bbe72ed67cd0f80f557",
                "md5": "9bf5b3d9bf39b0afc59b0f45f7f666e7",
                "sha256": "6085d224d9a3231833f7edea4f2d47950bb18e8233da46a7c1134f18e3b711ed"
            },
            "downloads": -1,
            "filename": "cas_python-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9bf5b3d9bf39b0afc59b0f45f7f666e7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 30955,
            "upload_time": "2024-09-09T16:26:26",
            "upload_time_iso_8601": "2024-09-09T16:26:26.519530Z",
            "url": "https://files.pythonhosted.org/packages/50/60/8b5dbc12579a627a7338e0eecaa1f963366d3e345bbe72ed67cd0f80f557/cas_python-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-09 16:26:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "asergios",
    "github_project": "cas-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "cas-python"
}
        
Elapsed time: 0.58630s