Skip to main content

A simple Python wrapper for Pinterest REST API (Beta) (5.x) ✨ 🍰 ✨

Project description

A simple Python wrapper for Pinterest REST API (Beta) (5.x) ✨ 🍰 ✨

https://github.com/sns-sdks/python-pinterest/workflows/Test/badge.svg https://codecov.io/gh/sns-sdks/python-pinterest/branch/main/graph/badge.svg

Introduction

This library provides a service to easily use Pinterest REST API for v5.x.

And support Async And sync mode.

More docs has published on https://sns-sdks.lkhardy.cn/python-pinterest/

Using

The API is exposed via the pinterest.Api class and pinterest.AsyncApi class.

INSTANTIATE

You can initial an instance with access token:

# Sync
>>> from pinterest import Api
>>> p = Api(access_token="Your access token")
# Async
>>> from pinterest import AsyncApi
>>> ap = AsyncApi(access_token="Your access token")

Usage

Get pin info:

# Sync
>>> p.pins.get(pin_id="1022106077902810180")
# Pin(id='1022106077902810180', created_at='2022-02-14T02:54:38')
# Async
>>> await ap.pins.get(pin_id="1022106077902810180")
# Pin(id='1022106077902810180', created_at='2022-02-14T02:54:38')

More docs has published on https://sns-sdks.lkhardy.cn/python-pinterest/

TODO

  • Tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-pinterest-0.2.0.tar.gz (19.2 kB view hashes)

Uploaded source

Built Distribution

python_pinterest-0.2.0-py3-none-any.whl (30.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page