hs-code-tariff
Zero-dependency offline Harmonized System (HS 2022) code validator, normalizer, 97-chapter & 21-section classifier, and keyword search utility for Python.
Need full 6/8/10-digit commodity descriptions, EU TARIC / US HTS duty rates, or natural-language product classification?
- Free browser lookup (no sign-up): radarbg.com/tools/hs-code-lookup
- REST API (JSON, full HS/HTS/tariff search): radarbg.com/apis/hs-code-tariff-lookup
Install
pip install hs-code-tariff
Quick Start
from hs_code_tariff import parse_hs_code, search_chapters
info = parse_hs_code("2204.21.00")
print(info)
# {
# 'raw': '2204.21.00',
# 'digits': '22042100',
# 'formatted': '2204.21.00',
# 'valid': True,
# 'level': 'CN-8 (EU Combined Nomenclature)',
# 'chapter': '22',
# 'chapter_title': 'Beverages, spirits and vinegar',
# 'section': 'IV',
# 'section_title': 'Prepared Foodstuffs; Beverages, Spirits and Vinegar; Tobacco',
# 'heading': '2204',
# 'subheading': '220421'
# }
hits = search_chapters("coffee")
# [{'chapter': '09', 'title': 'Coffee, tea, maté and spices', 'section': 'II', ...}]
CLI
hs-code-tariff 8517.13
hs-code-tariff --search "lithium battery"
hs-code-tariff --json 2204.21 6109.10
License
MIT
Metadata
Release files for hs-code-tariff 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hs_code_tariff-0.1.0.tar.gz | 7.7 kB | Without provenance | Details for hs_code_tariff-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hs_code_tariff-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for hs_code_tariff-0.1.0-py3-none-any.whl |
Total release size: 16.0 kB
Release files / hs_code_tariff-0.1.0.tar.gz
| Download URL | hs_code_tariff-0.1.0.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8353c13a1de30aa139d1a84a4f3976f827e400852805c53b5357843d4f34d425
|
|
BLAKE2b-256 checksum How to use checksums |
dce0a3603b01167f70ff2650eaa696fb97e0f38d66cd6c6629576108307a96e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / hs_code_tariff-0.1.0-py3-none-any.whl
| Download URL | hs_code_tariff-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd02dd91527b2198cd2b8617f2b02dfd740bf6244bf006a7fbaed5c9b700980d
|
|
BLAKE2b-256 checksum How to use checksums |
cc203560e83c8698acdf11598cb805966064d7aa8d078d69013d5d2f462f823c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for hs-code-tariff 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.