BAV API Python SDK
bavapi is a Python SDK for the WPP BAV API.
It is published on PyPI as wpp-bavapi.
With bavapi you can access the full BAV data catalog, the largest and most comprehensive database of brand data in the world.
Queries are validated automatically thanks to pydantic and retrieved asynchronously via the httpx package.
For more information about the API, go to the WPPBAV Developer Hub.
Prerequisites
bavapi requires Python 3.8 or higher to run.
If you don't have Python installed, you can find it from the official website or via Anaconda.
You will also need a BAV API token. For more information, go to the Authentication section of the API documentation.
Dependencies
httpx >= 0.20nest-asyncio >= 1.5pandas >= 1.0pydantic >= 2.0tqdm >= 4.62typing-extensions >= 4.6for Python < 3.12
Installation
bavapi can be installed using pip:
pip install wpp-bavapi
Installing from source
To install from source, clone the GitHub repository into your local machine:
git clone https://github.com/wppbav/bavapi-sdk-python.git
Go into the cloned directory and install bavapi:
cd bavapi-sdk-python
pip install .
Usage
Once you have acquired a token, you can start using this library directly in python or in a Jupyter Notebook:
>>> import bavapi
>>> result = bavapi.brands("TOKEN", name="Swatch") # Replace `"TOKEN"` with your BAV API token
>>> result
| sector_id | sector_name | id | name | ... | |
|---|---|---|---|---|---|
| 0 | 233 | Apparel & Accessories | 8635 | Swatch | ... |
| ... | ... | ... | ... | ... | ... |
Features
- Support for all endpoints in the WPPBAV Fount API.
- Extended support for the following endpoints:
audiencesaudience-groupsbrand-metricsbrand-metric-groupsbrandsbrandscape-datacategoriescitiescollectionscompaniescountriessectorsstudiesyears
- Other endpoints are available via the
raw_queryfunctions and methods. - Extended support for Fount API Tools/TurboPitch endpoints.
- Extended support for the following endpoints:
- Validates query parameters are of the correct types and provides type hints for better IDE support.
- Retrieve multiple pages of data simultaneously, monitoring and preventing exceeding API rate limit.
- Both synchronous and asynchronous APIs for accessing BAV data.
Documentation
Read more about bavapi in the documentation.
Issues
Please file an issue on GitHub here.
Contributing
Please see the Contributing section of the documentation for more information.
Metadata
Release files for wpp-bavapi 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| wpp_bavapi-1.1.0.tar.gz | 54.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wpp_bavapi-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 103.7 kB
Release files / wpp_bavapi-1.1.0.tar.gz
| Download URL | wpp_bavapi-1.1.0.tar.gz |
|---|---|
| Size | 54.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6a04397cb3a76911d961ceb1027d7b3d59fd367b1a9119498dfed51fd149899
|
|
BLAKE2b-256 checksum How to use checksums |
1def0ecc31672deba5d8f2f6664ca006de69d6cdfdc2abdd6197d17824e3e9eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / wpp_bavapi-1.1.0-py3-none-any.whl
| Download URL | wpp_bavapi-1.1.0-py3-none-any.whl |
|---|---|
| Size | 49.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f489f4f60b859bda31383ca90fe518ffb752c7874a7299e70dca2902c6af6fd0
|
|
BLAKE2b-256 checksum How to use checksums |
d51515199472254e783707dcd0be2225c4e63b19d7f813fb2f9fad3120466986
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for wpp-bavapi 1.1.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.