Skip to main content

iab-tcf

Testing codecov Codacy Badge Releasing Documentation Status

A Python implementation of the IAB consent strings (v1.1 and v2)

Installing

Install and update using pip:

pip install -U iab-tcf

Documentation

Documentation of this package can be found at readthedocs.io.

To generate the documentation locally:

uv sync --group docs
cd docs/
uv run sphinx-apidoc -f -o . ../iab_tcf/
uv run make html

A Simple Example

In order to decode a v1.1 or v2 consent string automatically we can do:

from iab_tcf import decode

consent = decode("CO5VTlWO5VTlWH1AAAENAwCwAIAAAAAAAIAAAAoAAAAA.YAAAAAAAAAA")

print(consent.version) # prints 2

If we want to improve performance and we already know it's going to be a v2 consent string we can do:

from iab_tcf import decode_v2

consent = decode_v2("CO5VTlWO5VTlWH1AAAENAwCwAIAAAAAAAIAAAAoAAAAA.YAAAAAAAAAA")

print(consent.version) # prints 2

Tests

The project is managed with uv. In order to run the tests locally we can do:

uv sync
uv run pytest -v .

Thanks

Many thanks to LiveRamp/iabconsent which greatly inspired this project, and forms the basis and internal logic.

Metadata

Release files for iab-tcf 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iab-tcf 0.3.0
File Size Uploaded Provenance Actions
iab_tcf-0.3.0.tar.gz 7.4 kB Without provenance Details for iab_tcf-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for iab-tcf 0.3.0
File Interpreter ABI Platform Actions
iab_tcf-0.3.0-py3-none-any.whl Python 3 none any Details for iab_tcf-0.3.0-py3-none-any.whl

Total release size: 17.0 kB

Release files / iab_tcf-0.3.0.tar.gz

Download URL iab_tcf-0.3.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
82f9bff867be14dc504e43408c985d64b3f0d72317e5ec6853f9d84109ef2ff4
BLAKE2b-256 checksum
How to use checksums
3f7683e3d0f98980ef1c2558bb22ac1ab79906d4efe85fd5628a822c2a978e78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / iab_tcf-0.3.0-py3-none-any.whl

Download URL iab_tcf-0.3.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88ef2d3dfbb164d43142405f4268d5c4f958acd6676f9d1762b20c3b4943fd2b
BLAKE2b-256 checksum
How to use checksums
75206ba56e81233a134d53b5c48178d5d85e16ca04e2ed11ee205e9bdc88be90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for iab-tcf 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page