Metadata-Version: 2.1
Name: python-pinterest
Version: 0.2.0
Summary: A simple Python wrapper for Pinterest REST API (Beta) (5.x) ✨ 🍰 ✨
Home-page: https://github.com/sns-sdks/python-pinterest
License: MIT
Keywords: pinterest,pinterest sdk,pinterest api v5
Author: ikaroskun
Author-email: merle.liukun@gmail.com
Requires-Python: >=3.6.2,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: Authlib (>=0.15.5,<0.16.0)
Requires-Dist: dataclasses-json (>=0.5.6,<0.6.0)
Requires-Dist: httpx (==0.22.0)
Project-URL: Repository, https://github.com/sns-sdks/python-pinterest
Description-Content-Type: text/x-rst

================
python-pinterest
================

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

.. image:: https://github.com/sns-sdks/python-pinterest/workflows/Test/badge.svg
    :target: https://github.com/sns-sdks/python-pinterest/actions

.. image:: https://codecov.io/gh/sns-sdks/python-pinterest/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/sns-sdks/python-pinterest


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
