Name | iab-tcf JSON |
Version |
0.2.2
JSON |
| download |
home_page | https://github.com/gguridi/iab-tcf |
Summary | A Python implementation of the IAB consent strings (v1.1 and v2) |
upload_time | 2022-10-31 10:40:39 |
maintainer | |
docs_url | None |
author | Gorka Guridi |
requires_python | >=3.6 |
license | |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
|
coveralls test coverage |
No coveralls.
|
# iab-tcf
[](https://travis-ci.org/gguridi/iab-tcf)
[](https://codecov.io/gh/gguridi/iab-tcf)
[](https://www.codacy.com/gh/gguridi/iab-tcf/dashboard)

[](https://iab-tcf.readthedocs.io/en/latest/?badge=latest)
A Python implementation of the IAB consent strings (v1.1 and v2)
## Installing
Install and update using pip:
```bash
pip install -U iab-tcf
```
## Documentation
[Documentation](https://iab-tcf.readthedocs.io/en/stable/) of this package can be
found at [readthedocs.io](https://iab-tcf.readthedocs.io/en/stable/).
To generate the documentation locally:
```bash
pip install sphinx sphinx_rtd_theme
cd docs/
sphinx-apidoc -f -o . ../iab_tcf/
make html
```
## A Simple Example
In order to decode a v1.1 or v2 consent string automatically we can do:
```python
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:
```python
from iab_tcf import decode_v2
consent = decode_v2("CO5VTlWO5VTlWH1AAAENAwCwAIAAAAAAAIAAAAoAAAAA.YAAAAAAAAAA")
print(consent.version) # prints 2
```
## Tests
In order to run the tests locally we can do:
```bash
pip install -r requirements-test.txt
pytest -v .
```
## Thanks
Many thanks to [LiveRamp/iabconsent](https://github.com/LiveRamp/iabconsent)
which greatly inspired this project, and forms the basis and internal logic.
Raw data
{
"_id": null,
"home_page": "https://github.com/gguridi/iab-tcf",
"name": "iab-tcf",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Gorka Guridi",
"author_email": "gorka.guridi@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/56/e2/4f55d67b5a42318f959ebacb629fb0701ab5aecb11d7510fd9b26e967a9d/iab-tcf-0.2.2.tar.gz",
"platform": null,
"description": "# iab-tcf\n\n[](https://travis-ci.org/gguridi/iab-tcf)\n[](https://codecov.io/gh/gguridi/iab-tcf)\n[](https://www.codacy.com/gh/gguridi/iab-tcf/dashboard)\n\n[](https://iab-tcf.readthedocs.io/en/latest/?badge=latest)\n\nA Python implementation of the IAB consent strings (v1.1 and v2)\n\n## Installing\n\nInstall and update using pip:\n\n```bash\npip install -U iab-tcf\n```\n\n## Documentation\n\n[Documentation](https://iab-tcf.readthedocs.io/en/stable/) of this package can be\nfound at [readthedocs.io](https://iab-tcf.readthedocs.io/en/stable/).\n\nTo generate the documentation locally:\n\n```bash\npip install sphinx sphinx_rtd_theme\ncd docs/\nsphinx-apidoc -f -o . ../iab_tcf/\nmake html\n```\n\n## A Simple Example\n\nIn order to decode a v1.1 or v2 consent string automatically we can do:\n\n```python\nfrom iab_tcf import decode\n\nconsent = decode(\"CO5VTlWO5VTlWH1AAAENAwCwAIAAAAAAAIAAAAoAAAAA.YAAAAAAAAAA\")\n\nprint(consent.version) # prints 2\n```\n\nIf we want to improve performance and we already know it's going to\nbe a v2 consent string we can do:\n\n```python\nfrom iab_tcf import decode_v2\n\nconsent = decode_v2(\"CO5VTlWO5VTlWH1AAAENAwCwAIAAAAAAAIAAAAoAAAAA.YAAAAAAAAAA\")\n\nprint(consent.version) # prints 2\n```\n\n## Tests\n\nIn order to run the tests locally we can do:\n\n```bash\npip install -r requirements-test.txt\npytest -v .\n```\n\n## Thanks\n\nMany thanks to [LiveRamp/iabconsent](https://github.com/LiveRamp/iabconsent)\nwhich greatly inspired this project, and forms the basis and internal logic.\n",
"bugtrack_url": null,
"license": "",
"summary": "A Python implementation of the IAB consent strings (v1.1 and v2)",
"version": "0.2.2",
"project_urls": {
"Homepage": "https://github.com/gguridi/iab-tcf"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cffca3f3701da727a0f1cfe16b4b3104da2cfcda8c095efd3f279588f7eac345",
"md5": "e4ed7de55b4b3d197bd024ed70f46119",
"sha256": "978ad80f0ea827f30b16646a271bc0f4812ce083012241150988c0cb11ccb605"
},
"downloads": -1,
"filename": "iab_tcf-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e4ed7de55b4b3d197bd024ed70f46119",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 13659,
"upload_time": "2022-10-31T10:40:38",
"upload_time_iso_8601": "2022-10-31T10:40:38.164154Z",
"url": "https://files.pythonhosted.org/packages/cf/fc/a3f3701da727a0f1cfe16b4b3104da2cfcda8c095efd3f279588f7eac345/iab_tcf-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "56e24f55d67b5a42318f959ebacb629fb0701ab5aecb11d7510fd9b26e967a9d",
"md5": "7749b8b6974b5af3d4ee181b671e6692",
"sha256": "7cf487331859ccdecec5bfab8434aa77677054092b95209e4c0d38e5c5c3f5ee"
},
"downloads": -1,
"filename": "iab-tcf-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "7749b8b6974b5af3d4ee181b671e6692",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 9135,
"upload_time": "2022-10-31T10:40:39",
"upload_time_iso_8601": "2022-10-31T10:40:39.248868Z",
"url": "https://files.pythonhosted.org/packages/56/e2/4f55d67b5a42318f959ebacb629fb0701ab5aecb11d7510fd9b26e967a9d/iab-tcf-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-10-31 10:40:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gguridi",
"github_project": "iab-tcf",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "iab-tcf"
}