Skip to main content

Python API for accessing sales tax information from Zip-Tax.com

Project description

Latest Version License

Codeship Status for albertyw/pyziptax Dependency Status Code Climate

Python API for Zip-Tax.com

Installation

pip install pyziptax

Usage Example

import pyziptax

# Single Tax Rate
pyziptax.api_key = ZIPTAX_KEY
rate = pyziptax.get_rate('10001', 'New York', 'NY')
# import decimal
# rate == decimal.Decimal('8.875')

# Multiple Tax Rates
pyziptax.api_key = ZIPTAX_KEY
rate = pyziptax.get_rate('94304', multiple_rates=True)
# rate == {u'LOCKHEED': Decimal('8.250'), u'PALO ALTO': Decimal('8.750')}

ZipTaxClient Parameters

  • ZIPTAX_KEY - API key you received when you registered on Zip-Tax.com

  • zip_code - The only required parameter

  • city - Optional

  • state - Optional

  • multiple_rates - If True, returns a dictionary of city names to tax rates; If False, returns just the tax rate, but raises a ZipTaxFailure if multiple rates were returned.

Development

Pull requests welcome!

# Set up repository for development
pip install tox
python setup.py install

# Run tests
tox

To update PyPI:

pip install twine
python setup.py sdist bdist_wheel
twine upload dist/*

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

pyziptax-1.2.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

pyziptax-1.2.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file pyziptax-1.2.1.tar.gz.

File metadata

  • Download URL: pyziptax-1.2.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyziptax-1.2.1.tar.gz
Algorithm Hash digest
SHA256 9763aee53871469461636cbb00cf906a91f42d25c6323497b60f0e6595054e17
MD5 54dd112d91293e31729107b1670df047
BLAKE2b-256 2d17d35370d8d27cbcd60eee68381e7cba3e640379bdd127239ac4c8f56f47fb

See more details on using hashes here.

File details

Details for the file pyziptax-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyziptax-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c44b2dbc06b0d1164a6a5738b6da434cdbfe6e90c92676dee1aac16212ab2291
MD5 6bafc134a8269b8a45928b01003177cd
BLAKE2b-256 688f0c47fcbb1dd0fa0942485c6631c755416f7ae2b4a8b15a22350bf09547c3

See more details on using hashes here.

Supported by

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