API wrapper for Podio written in Python
Project description
podio-python
podio-python is an API wrapper for Podio, written in Python.
This library uses Oauth2 for authentication.
Installing
pip install podio-python
Usage
# if you have an access token:
from podio.client import Client
client = Client(access_token=access_token)
# if you are using Oauth2 to get an access_token:
from intercom.client import Client
client = Client(client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri)
To obtain and set an access token:
- Get authorization URL
url = client.authorization_url(state=None)
- Get access token using code
response = client.get_access_token(code)
- Set access token
client.set_token(access_token)
Check more information about Podio Oauth: https://developers.podio.com/authentication/server_side
Refresh token
If your access token expired you can use your refresh token to obtain a new one:
token = client.refresh_token(refresh_token)
# And then set your token again:
client.set_token(token["access_token"])
Get user status
user = client.get_user_status()
Organizations
List organizations
orgs = client.list_organizations()
List organization spaces
spaces = client.get_organization_spaces(org_id)
List space members
members = client.get_space_members(space_id)
Applications
List applications
apps = client.list_applications()
Get application
app = client.get_application(app_id)
Create item
body = {"fields": {"title": "Juan Assignment", "status": 1}}
item = client.create_item(app_id, body)
Create task
body = {"text": "Text of the task", "description": "desc"}
task = client.create_task(body)
Get task labels
labels = client.get_task_labels()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
podio_python-0.1.1.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for podio_python-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d7b99872714cd9d1c9e044fab0092cf42d935714899389ffbfb6b91e257eea7 |
|
MD5 | 28e90485e07eef89fb2ad3dcc44e2f44 |
|
BLAKE2b-256 | f82fa76b8f84b9f1554e95365503f7c022c6331aab8a9361bb171e4629407903 |