Registry / communication / pinterest-generated-client

pinterest-generated-client

JSON →
library0.1.11pypypiunverified

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-client
INSTALL
IMPORT
SIG · PINTEREST-GENERATE
P
pinterest-generated-client
communicationpythonv0.1.11
Install
2.8s avg
Import
—
Disk
43MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.1.11 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 43.2MB
glibc
py 3.10–3.920 runs
installs and imports cleanly · install 2.8s · import 0.000s · 44MB
43MB installed
● package 43MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Configuration
✓ from openapi_generated.configuration import Configuration
✗ from openapi_generated import Configuration

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.

import os import pinterest_generated_client from pinterest_generated_client.rest import ApiException # Configure OAuth2 access token for authentication configuration = pinterest_generated_client.Configuration( host = "https://api-sandbox.pinterest.com/v5" ) configuration.access_token = os.environ.get("PINTEREST_ACCESS_TOKEN", "") # Create an instance of the API client api_client = pinterest_generated_client.ApiClient(configuration) # Create an instance of the specific API you want to use api_instance = pinterest_generated_client.UserAccountApi(api_client) try: # Get user account information user_account = api_instance.get_user_account() print("User Account Data:", user_account) except ApiException as e: print(f"Exception when calling UserAccountApi->get_user_account: {e}") if e.status == 401: print("Hint: Check your PINTEREST_ACCESS_TOKEN environment variable.") except Exception as e: print(f"An unexpected error occurred: {e}") finally: api_client.close()
Debug
Known issues
breakingThe package name for this client changed in version 0.1.5. If you were using an older, pre-0.1.5 version of the Pinterest Python SDK (possibly named differently), your import paths will need to be updated to `pinterest_generated_client`.
fix
Ensure your `pip install` command is `pip install pinterest-generated-client` and update all `import` statements to use `pinterest_generated_client`.
affects: <0.1.5
gotchaThis library explicitly depends on `pydantic < 2`. Installing `pydantic` version 2.x will cause breaking changes and runtime errors due to its major API overhaul. Ensure Pydantic is pinned to a 1.x version.
fix
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`.
affects: All versions
deprecatedSpecific API endpoints or parameters may become deprecated or change between versions. For instance, the 'Get catalog product groups' endpoint was deprecated in version 0.1.8.
fix
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.
affects: 0.1.8+
gotchaThe quickstart examples often use the sandbox API host (`https://api-sandbox.pinterest.com/v5`). Remember to change this to the production host (`https://api.pinterest.com/v5`) when moving your application to a production environment.
fix
Explicitly set `configuration.host = "https://api.pinterest.com/v5"` for production use.
affects: All versions
Upgrade
Version history
0.1.11latest on PyPI · released Sep 15, 2025
Audit
Dependencies
urllib3requiredHTTP client for API requests.
python-dateutilrequiredFor date/time parsing and serialization.
frozendictrequiredFor handling immutable dictionary structures.
pydanticrequiredFor data validation and serialization (version < 2 required).
aenumrequiredFor handling enumerated types.
Agent activity
30 hits · last 30 days
node
28
OpenAI (training)
1
Resources
pinterest-generated-client — pip install pinterest-generated-client · libregistry