Skip to main content

Thin Python client for the TaxLocus REST API

Project description

taxlocus (Python)

Thin Python client for the TaxLocus REST API.

Install

pip install taxlocus

Usage

from taxlocus import TaxLocus

client = TaxLocus(api_key="tlx_live_...")
rate = client.lookup_rate("general", lat=37.7749, lng=-122.4194)
print(rate["combined_rate"])

Methods

All methods POST to the API and return the parsed JSON response as a dict. A non-2xx response raises TaxLocusError (with .code, .message, .status_code).

  • lookup_rate(product_category, *, lat, lng, address, sale_amount, as_of)/v1/rate/lookup
  • calculate_cart(line_items, *, lat, lng, address, as_of)/v1/cart/calculate
  • check_nexus(state, ytd_sales, ytd_transactions, *, include_marketplace_sales)/v1/nexus/check
  • filing_calendar(state, *, annual_revenue, registration_date)/v1/filing/calendar
  • taxability_check(state, *, product_category, product_categories)/v1/taxability/check

Pass either lat + lng or an address dict (line1, city, state, postal_code) to the location-based methods.

The client is also a context manager:

with TaxLocus(api_key="tlx_live_...") as client:
    result = client.check_nexus("CA", ytd_sales=600_000, ytd_transactions=320)

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

taxlocus-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

taxlocus-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: taxlocus-0.1.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for taxlocus-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b30b1cf1b0993aee5bed7805d87aea7636cb1e04e41ff96b0948b2eacbe7d018
MD5 b0fed9d2d27dfed22212f669235a3a09
BLAKE2b-256 f7191201e1de4a9ca45f5371a26c53c5202c2fc26251de10e335f8c5c2732f27

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taxlocus-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for taxlocus-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd0f62d41561df14f308d9bf705f7be4f2cb060bf268905b8f40f7e08b17e4a6
MD5 831b7bfaf3980db7df382bce7e263172
BLAKE2b-256 412a9c902b9557d7a6e70c7cafb8bbca0fd96e0fb3af07d9ff5448c9b3c77fdf

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