Skip to main content

fdc — Free Decimal Classification

A Python library for looking up Free Decimal Classification codes. Built from the FDC correspondence file.

Quick start

from fdc import Label

label = Label.parse("976.4")
label.best   # '"Texas"'

for layer in label.layers:
    print(f"{layer.code}: {layer.label}")

# 9: History & geography
# 970: "America" + "North America"
# 976: "Gulf States" + "Southwest, Old"
# 976.4: "Texas"

Use .best to get the most specific resolved label without walking layers:

label = Label.parse("999.9")
label.best   # '"Outer Space"'  (last resolved layer)
label.layers[-1].label  # None (no entry for this exact code)

Pass raise_on_error=True for strict mode:

from fdc import Label
from fdc.label import LabelError

try:
    Label.parse("999.9", raise_on_error=True)
except LabelError:
    pass  # no entry for this code

Installing from PyPI

pip install free-decimal-correspondence

The package ships with a pre-built lookup table (fdc/_table.py) so parsing is never needed at runtime. The table is loaded into memory the first time you call Label.parse() - after that, lookups take roughly two microseconds.

Contributing

The taxonomy data lives in the classification/ submodule. If you improve it, rebuild the lookup table before committing:

python -m fdc.build

This regenerates fdc/_table.py from the text file. Commit both the submodule change and the regenerated table.

Metadata

Release files for free-decimal-correspondence 0.1.2

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

Source distribution (sdist)

Source distribution for free-decimal-correspondence 0.1.2
File Size Uploaded Provenance Actions
free_decimal_correspondence-0.1.2.tar.gz 24.6 kB With provenance Details for free_decimal_correspondence-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for free-decimal-correspondence 0.1.2
File Interpreter ABI Platform Actions
free_decimal_correspondence-0.1.2-py3-none-any.whl Python 3 none any Details for free_decimal_correspondence-0.1.2-py3-none-any.whl

Total release size: 47.7 kB

Release files / free_decimal_correspondence-0.1.2.tar.gz

Download URL free_decimal_correspondence-0.1.2.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ecf85b0c5caec779362a0f9690e36541718f52eabaeaf378427ca07a52985e76
BLAKE2b-256 checksum
How to use checksums
0b6fc41c1841921fd23bd7ac6da8f92ceb6dc13dfb6350273e5b255daca0cc75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 10, 2026.

Transparency log

Release files / free_decimal_correspondence-0.1.2-py3-none-any.whl

Download URL free_decimal_correspondence-0.1.2-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
029b7a59bd53a7b9b75f920badada7b1eefaa82e0cf09f8f4ef1db755b58f157
BLAKE2b-256 checksum
How to use checksums
fa09e2081b2231e259d04c8c6a491304d5eb3bdb09e93c6bd0fea059b70e080a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 10, 2026.

Transparency log

Security for free-decimal-correspondence 0.1.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for free_decimal_correspondence-0.1.2.tar.gz

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 May 10, 2026.

Transparency log

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.2 This release

2 release files Full 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