Skip to main content

Official Python SDK for the TaxFormatter API — parse crypto CSVs and bank statement PDFs

Project description

taxformatter

Official Python SDK for the TaxFormatter API — parse crypto exchange CSVs and bank statement PDFs programmatically.

Install

pip install taxformatter

Quick Start

from taxformatter import TaxFormatter

tf = TaxFormatter("tf_live_xxx")

# Parse a file by path
result = tf.parse("./coinbase_2025.csv")

# Parse bytes with options
result = tf.parse(raw_bytes, filename="coinbase.csv", output_format="turbotax")

# List supported sources
sources = tf.list_sources()

# Check usage
usage = tf.get_usage()

Configuration

tf = TaxFormatter(
    "tf_live_xxx",
    base_url="https://api.taxformatter.com",  # default
    timeout=30,    # seconds, default
    max_retries=3, # auto-retry on 429, default
)

Error Handling

from taxformatter import TaxFormatter, AuthenticationError, RateLimitError, ParseError

try:
    result = tf.parse("./file.csv")
except AuthenticationError:
    # 401 — invalid or missing API key
    pass
except RateLimitError as e:
    # 429 — rate limited (auto-retried 3 times before raising)
    print(e.retry_after)
except ParseError as e:
    # 422 — file could not be parsed
    print(e.suggestion)

API

tf.parse(input, filename=None, output_format=None, exchange=None, bank=None)

Parse a crypto CSV or bank statement PDF.

  • input: File path (str/Path) or bytes
  • filename: Required when passing bytes
  • output_format: "koinly", "turbotax", "coinledger", or "zenledger"
  • exchange: Force exchange detection (e.g., "coinbase")
  • bank: Force bank detection (e.g., "chase")

tf.list_sources()

List all supported crypto exchanges and banks.

tf.get_usage()

Get current month's API usage.

tf.health()

Check API health status.

License

MIT

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

taxformatter-0.1.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

taxformatter-0.1.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file taxformatter-0.1.1.tar.gz.

File metadata

  • Download URL: taxformatter-0.1.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for taxformatter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9103d2551d1a1f36894ab88e1d1aeef3008af0d1b0f9371d9ab495dd2408234b
MD5 79069eefa7572ff9da3e8df060d3d051
BLAKE2b-256 2f966a3b0786460ee0e78d13dd55ad3d8be201247794986baa52dcf969a53fcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for taxformatter-0.1.1.tar.gz:

Publisher: publish-pypi.yml on Sean-Bravo/trw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taxformatter-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: taxformatter-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for taxformatter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b5bfc5df5f396911fa46a42be596d4be9e841cc94f3199e4bd10d29ffa0c918
MD5 3a14cebc9840fb91919d5739a6670ef7
BLAKE2b-256 be33f475f4748f5e2f92143e0414dd1d55efedb221a84555c3a299b00f5af17c

See more details on using hashes here.

Provenance

The following attestation bundles were made for taxformatter-0.1.1-py3-none-any.whl:

Publisher: publish-pypi.yml on Sean-Bravo/trw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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