Skip to main content

ChemNames

A CLI utility to retrieve chemical data (SMILES, InChI, Full Names) from PubChem and map Compound names to their corresponding identifiers.

Installation

This package is managed with standard Python tools and can be installed via pip.

  1. Clone the repository.
  2. Install the package in editable mode (or normal mode):
pip install .

Or using uv to manage the environment:

uv pip install .

After installation, the CLI tool addchemnames will be available in your path.

Usage

1. Retrieve Chemical Data

The main utility reads a CSV file containing a Compound column, queries PubChem, and outputs a new CSV with added SMILES, InChI, and Full Name columns.

Input CSV Format: The input file MUST contain a column named Compound.

Example input.csv:

Compound,ID
Aspirin,1
Caffeine,2

Run the command:

addchemnames input.csv output.csv

Output: The tool will generate output.csv with the enriched data. If a compound is not found, "xxxxxx" will be used as the placeholder.

2. Add KEGG IDs

If you have a CSV file that already contains PubChem CIDs (e.g., from a previous step or source), you can use add_keggs.py (located in the root of the repository) to append KEGG IDs.

Run the command:

python add_keggs.py input_with_cids.csv output_with_keggs.csv

Notes

  • Network Requests: This tool makes network requests to PubChem. Large files may take some time to process.
  • Rate Limiting: The tool uses threading to speed up requests, but be mindful of PubChem's usage policies.
  • Data Accuracy: Data is fetched "as is" from PubChem.

License

MIT

Metadata

Release files for chemnames 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chemnames 0.2.1
File Size Uploaded
chemnames-0.2.1.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chemnames 0.2.1
File Interpreter ABI Platform
chemnames-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / chemnames-0.2.1.tar.gz

Download URL chemnames-0.2.1.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1d999009c095966edda2ab05d31e5a70b50cc48cb621e763b09631385fca5f93
BLAKE2b-256 checksum
How to use checksums
e08209ffc7459cd693bf8ea24885f8eeb2c203b78057fcd82918a26c388b1522
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.

Transparency log

Release files / chemnames-0.2.1-py3-none-any.whl

Download URL chemnames-0.2.1-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
529eafbd70a83616b29a53483156207c1e3c0e4414556ba0e84b719e7328da69
BLAKE2b-256 checksum
How to use checksums
8dda3e901714fd276837eb69315881c217ce06e9c6cee052c7607c930c92f811
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page