iab-tcf-0.2.2
توضیحات
A Python implementation of the IAB consent strings (v1.1 and v2)
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | iab-tcf-0.2.2 |
| نام | iab-tcf |
| نسخه کتابخانه | 0.2.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Gorka Guridi |
| ایمیل نویسنده | gorka.guridi@gmail.com |
| آدرس صفحه اصلی | https://github.com/gguridi/iab-tcf |
| آدرس اینترنتی | https://pypi.org/project/iab-tcf/ |
| مجوز | - |
# 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.
نیازمندی
| مقدار | نام |
|---|---|
| >=1.5.2 | bitarray-hardbyte |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl iab-tcf-0.2.2:
pip install iab-tcf-0.2.2.whl
نصب پکیج tar.gz iab-tcf-0.2.2:
pip install iab-tcf-0.2.2.tar.gz