The `pinterest-generated-client` is an auto-generated Python SDK for interacting with the Pinterest REST API (v5). It provides programmatic access to Pinterest's platform, enabling developers to manage ads, pins, boards, users, and more. As an auto-generated client, it aims to quickly reflect changes in the Pinterest API specification. It is actively maintained with frequent minor releases reflecting API spec updates.
pip install pinterest-generated-clientVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Pinterest API client using an OAuth2 access token from an environment variable and fetch user account details. Remember to set `PINTEREST_ACCESS_TOKEN` before running.
Ensure your `pip install` command is `pip install pinterest-generated-client` and update all `import` statements to use `pinterest_generated_client`.
If you encounter validation errors related to Pydantic, ensure it's installed as `pip install 'pydantic<2'` or add `'pydantic<2'` to your project's `requirements.txt`.
Always check the official Pinterest API documentation and the client's changelog for endpoint deprecations and replacements before upgrading major versions or when encountering unexpected API errors.
Explicitly set `configuration.host = "https://api.pinterest.com/v5"` for production use.