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 podio.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)
Get space
spaces = client.get_space(space_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)
Get item
item = client.get_item(item_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()
Webhooks
List webhooks
hooks = client.list_webhooks(ref_type, ref_id)
Create webhook
hook = client.create_webhook(ref_type, ref_id, url, hook_type)
Validate hook verification
client.validate_hook_verification(webhook_id, code)
Delete webhook
client.delete_webhook(webhook_id)
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.6.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for podio_python-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cef4381b38225efcd41a22dac594f5be0944f9e1422585c531977bd376b825b |
|
MD5 | 6605785f64c59bcefeda4dd7df6e90b3 |
|
BLAKE2b-256 | cf81c82f369b3628af2f1c3aebd7864f7b123cfd2e653084a34c378c565fbae4 |