Skip to main content

Tariff rate and duty calculation based on Bangladesh Import and Export related H.S. Code

Project description

BD Tariff

This project provides a Python interface to access tariff rates and calculate duties based on the Bangladesh Customs Tariff for the fiscal year 2025-2026. The tariff data is sourced from the official document: Tariff 2025-2026 (02-06-2025).pdf.

Installation

(Add installation instructions here, e.g., pip install bdtariff if you plan to publish it to PyPI, or instructions for cloning the repository and setting it up locally.)

How to Get Total Duty

To calculate the total duty for a given HSCode and assess value:

from bdtariff import duty

duty()
When prompted, enter the HSCode and then the Assess Value in BDT. The function will return the total duty in BDT.

How to Know Tariff Rate
To retrieve the individual tariff rates for a specific HSCode:

Python

from bdtariff import rate

rate()
When prompted, enter the HSCode. The function will display the applicable tariff rates.

How to Get Tariff Details One by One
You can also access the individual tariff components and description for a given HSCode programmatically:

Python

from bdtariff import hscode

# Replace "HSCODE" with the actual 8-digit HSCode
result = hscode("HSCODE")

if result:
    print(result.cd)            # Get the 'cd' (Customs Duty) field
    print(result.sd)            # Get the 'sd' (Supplementary Duty) field
    print(result.rd)            # Get the 'rd' (Regulatory Duty) field
    print(result.vat)           # Get the 'vat' (Value Added Tax) field
    print(result.at)            # Get the 'at' (Advance Tax) field
    print(result.ait)           # Get the 'ait' (Advance Income Tax) field
    print(result.tti)           # Get the 'tti' (Total Taxable Imports) field - Note: This might be a calculated value, confirm its exact meaning in your context.
    print(result.tarriff_description) # Get the 'Tariff Description' field
    print(result.as_dict())     # Get all available fields as a dictionary
else:
    print("HSCode not found")
Sample Program
Here's a complete example demonstrating how to use the hscode function:

Python

from bdtariff import hscode

result = hscode("01012100") # Example HSCode for live horses, purebred breeding

if result:
    print(f"Customs Duty (CD): {result.cd}")
    print(f"Supplementary Duty (SD): {result.sd}")
    print(f"All Tariff Details: {result.as_dict()}")
else:
    print("HSCode not found")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bdtariff-0.1.0.tar.gz (173.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bdtariff-0.1.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file bdtariff-0.1.0.tar.gz.

File metadata

  • Download URL: bdtariff-0.1.0.tar.gz
  • Upload date:
  • Size: 173.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for bdtariff-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d44475653802415d41e16714d2190a0038e99b1c31e9b042c176cf74e433198
MD5 6edafc87d3ed7c8479a98d45e707f82b
BLAKE2b-256 8ba8b9972ebd3fa8c81dcc8ca7fbf2a4535bf25b626ff873b6bd843f2a08251b

See more details on using hashes here.

File details

Details for the file bdtariff-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bdtariff-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for bdtariff-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0af6b23a9e96791a07e965b5d67d4f893902cea534a651df6ba81745376dc631
MD5 5eeedace2a41f40df0721e239c048336
BLAKE2b-256 b9c059404dd4ec41f1ae64c2ff17d061be1727bf736989c272039cbae73fb031

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page