Python wrapper around the Pinterest developer APIs
Project description
Overview
User friendly Python wrapper for the Pinterest developer APIs. This project is currently in very early development, with only a bare minimum of functionality, intended for some of my personal projects. I’m sharing it here in case someone finds the implementation helpful for their projects. Also, if anyone would like to contribute to this pet project feel free to fork it and send me pull requests for any changes you may like.
Comments, suggestions and bugs may be reported to the project maintainer
Full API documentation can be found on ReadTheDocs.org.
Development Environment
In order to make use of this library, you will need a private access token to use when instantiating the main api class. This token authenticates you as a specific Pinterest user, giving access to that users’ profile, boards and pins. Typically this token would be generated by an application, but for testing purposes you can manually generate a token as described below. These steps are loosley based on the steps described on the Developer API under the “Postman” app section.
Navigate to the Pinterest developer website and sign up for a free account: https://developers.pinterest.com
Under your personal profile, click the “Create App” button
Name your app something appropriate like “My Test App”
Once you create your test app, you’ll need to set up a “Platform”. Under the “Web” platform enter: https://www.getpostman.com/oauth2/callback
Download and install Postman app for your platform: https://www.getpostman.com/apps
When you launch the app, you’ll be prompted to set up a free account. Either set up a free account or choose the “skip” link at the bottom of the page.
Click the “new request” button on the wizard that pops up
enter a name for your config (ie testing)
click create collection and give it a name (ie my collection)
click save
in the “get” field enter a Pinterest rest api endpoint url like: https://api.pinterest.com/v1/me/pins
under “Authorization -> type” select oauth 2.0
under “Add authorization data to” select “request url”
click “get new access token”
fill out the form that pops up as follows:
grant type: authorization code
callback url: https://www.getpostman.com/oauth2/callback
auth url: https://api.pinterest.com/oauth
access token url: https://api.pinterest.com/v1/oauth/token
clientID: app ID from your pinterest app created above
client secret: app secret also from your pinterest app
scope: read_public,write_public,read_relationships,write_relationship
state: leave blank
client authentication: send as basic auth header
click request token
you’ll be redirected to pinterest web site. Log in as yourself.
when prompted, click “okay”to allow your test app access to your pinterest account
click “use token”
The token will appear in the collection configuration. Copy the token from there and paste it into your script or pass it along to the calls to fpins on the console.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file friendlypins-1.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: friendlypins-1.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f211771465a8bd9cb0642dbf4c00c86116fbda00440fcaa290ca22cd0ce55dd4 |
|
MD5 | d1ded1810fc98816774258315968c2ed |
|
BLAKE2b-256 | 3be8050fe6c160cfd3b07f40c643ff1462986cc220f9cccad537ae84567174e7 |