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/lookupcalculate_cart(line_items, *, lat, lng, address, as_of)—/v1/cart/calculatecheck_nexus(state, ytd_sales, ytd_transactions, *, include_marketplace_sales)—/v1/nexus/checkfiling_calendar(state, *, annual_revenue, registration_date)—/v1/filing/calendartaxability_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b30b1cf1b0993aee5bed7805d87aea7636cb1e04e41ff96b0948b2eacbe7d018
|
|
| MD5 |
b0fed9d2d27dfed22212f669235a3a09
|
|
| BLAKE2b-256 |
f7191201e1de4a9ca45f5371a26c53c5202c2fc26251de10e335f8c5c2732f27
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd0f62d41561df14f308d9bf705f7be4f2cb060bf268905b8f40f7e08b17e4a6
|
|
| MD5 |
831b7bfaf3980db7df382bce7e263172
|
|
| BLAKE2b-256 |
412a9c902b9557d7a6e70c7cafb8bbca0fd96e0fb3af07d9ff5448c9b3c77fdf
|