Python SDK
The Python SDK for the BAV API makes it easy to consume BAV data within your Python scripts. It is published
as wpp-bavapi
in PyPI and hosted
on GitHub.
Queries are validated automatically thanks to pydantic
and retrieved asynchronously via the httpx
package.
To start using bavapi
, go to the Installation section.
After going through the Installation, please see Basic Usage. For more advanced topics, see the Advanced Usage section.
Each Fount API endpoint may behave slightly differently. You can find detailed explanations in the Endpoints section.
Example usage
🔒 To use bavapi
, you will need a Fount API token. Read more in the Authentication section.
>>> import bavapi
>>> result = bavapi.brands("TOKEN", name="Swatch") # Replace "TOKEN" with your 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 following endpoints:
- Other endpoints are available via the
raw_query
functions and methods.
- Validates query parameters are of the correct types and provides type hints for better IDE support.
- Retrieve multiple pages of data simultaneously, as well as monitors and prevents exceeding API rate limit.
- Both synchronous and asynchronous APIs for accessing BAV data.
Issues
For bug reports and feature requests, please open an issue on GitHub.
Contributing
We welcome contributions to the Python SDK which is hosted as a public repository on GitHub. Please see the Contributing document for more information.