Skip to main content

Mini-Classyfire

A lightweight, zero-dependency Python client and CLI tool designed to batch-process and extract high-resolution chemical taxonomy classifications from the ClassyFire API.


Key Features

  • Zero Dependencies: Built entirely on Python's native standard library (urllib, json, csv). No external heavy frameworks required.
  • Defensive Parsing Architecture: Dynamically inspects and normalizes unpredictable API schema variations (e.g., handling fields like molecular_framework or alternative_parents when they dynamically alternate between plain strings, nested dictionaries, or arrays).
  • High-Resolution Taxonomy Capture: Extracts deep structural metadata, including direct_parent, subclass, and molecular_framework, rather than just top-level categories.
  • Strict Upstream Rate-Limiting: Features an integrated throttling guard capped at ~6.6 requests per second to strictly honor ClassyFire's upstream limit (<10 req/s), preventing IP blocking or 429 Too Many Requests faults.
  • Progressive Disk Flushing: Writes outputs to a structured CSV file row-by-row in real-time. If a network disruption occurs mid-batch, data fetched up to that exact second is safely preserved on disk.

Project Architecture

mini_classifier/
│
├── src/
│   └── mini_classyfire/
│       ├── __init__.py
│       └── client.py
│
├── main.py
├── compounds.txt
└── pyproject.toml

Usage

Run the bulk processor by passing an input text file containing one InChIKey per line:

Command Line Interface (CLI)

python main.py -f compounds.txt

Optional Arguments

You can explicitly override the default output destination using the -o or --output flag: Bash

python main.py -f compounds.txt -o custom_output_report.csv


2. The LICENSE File

Create a separate text file named exactly LICENSE (no extension) in your root directory and paste this standard MIT text inside it. The placeholder name completely masks your real identity while granting open-source permissions:

MIT License

Copyright (c) 2026

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Metadata

Release files for mini-classyfire 0.1.0

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

Source distribution (sdist)

Source distribution for mini-classyfire 0.1.0
File Size Uploaded Provenance Actions
mini_classyfire-0.1.0.tar.gz 6.8 kB Without provenance Details for mini_classyfire-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mini-classyfire 0.1.0
File Interpreter ABI Platform Actions
mini_classyfire-0.1.0-py3-none-any.whl Python 3 none any Details for mini_classyfire-0.1.0-py3-none-any.whl

Total release size: 10.4 kB

Release files / mini_classyfire-0.1.0.tar.gz

Download URL mini_classyfire-0.1.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6f3ac132b3326244598ab349b703d2d4f88dc79117afe159d5e84540e5c4b4f6
BLAKE2b-256 checksum
How to use checksums
c29e1ead20b5135e546bcbac3632eb65684219e5887b6549ed38e9c122ea4993
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.20 {"installer":{"name":"uv","version":"0.9.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mini_classyfire-0.1.0-py3-none-any.whl

Download URL mini_classyfire-0.1.0-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
646978f61f76a3256f22815072e3b90b6679cc9694aa095d478c66a9b4decd70
BLAKE2b-256 checksum
How to use checksums
b7654c1a243de7ca3a7c203e42fe402af76fa5cfb107356a75edd42cebf24c9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.20 {"installer":{"name":"uv","version":"0.9.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for mini-classyfire 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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