Metadata-Version: 2.4
Name: PubChemPy
Version: 1.0.5
Summary: A simple Python wrapper around the PubChem PUG REST API.
Author-email: Matt Swain <m.swain@me.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/mcs07/PubChemPy
Project-URL: Repository, https://github.com/mcs07/PubChemPy
Project-URL: Documentation, https://docs.pubchempy.org
Project-URL: Releases, https://github.com/mcs07/PubChemPy/releases
Project-URL: Issue Tracker, https://github.com/mcs07/PubChemPy/issues
Keywords: pubchem,python,rest,api,chemistry,cheminformatics
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database :: Front-Ends
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: pandas
Requires-Dist: pandas>=0.16.2; extra == "pandas"
Provides-Extra: ssl
Requires-Dist: certifi>=2025.7.14; extra == "ssl"
Dynamic: license-file

# PubChemPy

[![PyPI Version](https://img.shields.io/pypi/v/PubChemPy?logo=python&logoColor=%23ffffff)](https://pypi.python.org/pypi/PubChemPy)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/pubchempy?logo=anaconda&logoColor=%23ffffff)](https://anaconda.org/conda-forge/pubchempy)
[![License](https://img.shields.io/pypi/l/PubChemPy)](https://github.com/mcs07/PubChemPy/blob/main/LICENSE)
[![DOI](https://zenodo.org/badge/7462957.svg)](https://zenodo.org/badge/latestdoi/7462957)
[![Tests](https://img.shields.io/github/actions/workflow/status/mcs07/pubchempy/test.yml?logo=github&logoColor=%23ffffff&label=tests)](https://github.com/mcs07/PubChemPy/actions/workflows/test.yml)
[![Docs](https://img.shields.io/readthedocs/pubchempy?logo=readthedocs&logoColor=%23ffffff)](https://docs.pubchempy.org)

PubChemPy provides a way to interact with PubChem in Python. It allows chemical searches by name, substructure and similarity, chemical standardization, conversion between chemical file formats, depiction and retrieval of chemical properties.

## Installation

Install PubChemPy with pip:

```shell
pip install pubchempy
```

Or with conda:

```shell
conda install -c conda-forge pubchempy
```

For detailed instructions, see the [installation guide](https://docs.pubchempy.org/en/latest/guide/install.html).

## Example usage

Retrieve a compound by its PubChem Compound Identifier (CID) and print its SMILES and IUPAC name:

```pycon
>>> import pubchempy as pcp
>>> comp = pcp.Compound.from_cid(1423)
>>> print(comp.smiles)
CCCCCCCNC1CCCC1CCCCCCC(=O)O
>>> print(comp.iupac_name)
7-[2-(heptylamino)cyclopentyl]heptanoic acid
```

Search compounds by name and print the SMILES and molecular weight of the first result:

```pycon
>>> results = pcp.get_compounds("Aspirin", "name")
>>> print(results[0].smiles)
CC(=O)OC1=CC=CC=C1C(=O)O
>>> print(results[0].molecular_weight)
180.16
```

## Documentation

Full documentation is available at <https://docs.pubchempy.org>.

This includes a [step-by-step guide on how to use PubChemPy](https://docs.pubchempy.org/en/latest/guide/gettingstarted.html), as well as a [complete API reference](https://docs.pubchempy.org/en/latest/api.html).

## Contributing

- Feature ideas and bug reports are welcome on the [Issue Tracker](https://github.com/mcs07/PubChemPy/issues).
- Fork the [source code](https://github.com/mcs07/PubChemPy) on GitHub, make changes and file a pull request.

## License

PubChemPy is licensed under the [MIT license](https://github.com/mcs07/PubChemPy/blob/main/LICENSE).
