Python consumer for the WPPBAV Fount API.
Project description
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.20
nest-asyncio >= 1.5.6
pandas >= 0.16.2
pydantic >= 1.10, < 2.0
tqdm >= 4.62
typing-extensions >= 3.10
for Python < 3.10
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 Fount API. Extended support for the
audiences
,brands
,brandscape-data
andstudies
endpoints.- Other endpoints are available via the
raw_query
functions and methods.
- Other endpoints are available via the
- Validates query parameters are of the correct types.
- Provides type hints for better IDE support.
- Retrieve multiple pages of data simultaneously.
- Monitors and prevents 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wpp-bavapi-0.7.0.tar.gz
.
File metadata
- Download URL: wpp-bavapi-0.7.0.tar.gz
- Upload date:
- Size: 31.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3702fee80539e5bf19fc3c0a0eaebc3c4529855c95d285c9f24382f299f67c9 |
|
MD5 | 92380ac4b754debf95e4ad9bad299a8d |
|
BLAKE2b-256 | b18c63c76cb6bf3121dcbc448c7a55a5516bde26b81c59f2f1ed67f6812f7c25 |
File details
Details for the file wpp_bavapi-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: wpp_bavapi-0.7.0-py3-none-any.whl
- Upload date:
- Size: 30.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99f0ac31617c85b840f17d053ae61e13d8cb7c373ab32e5a8ecb8466754fe1d2 |
|
MD5 | b840ad718a06c12af19d2065e96d9882 |
|
BLAKE2b-256 | 30b4a67055bb06379e35ee94c9fb77321b55c0df47cb09934f6aa08d67af115e |