podio-python is an API wrapper for Podio, written in Python.
This library uses Oauth2 for authentication.
pip install podio-python
# 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
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"])user = client.get_user_status()orgs = client.list_organizations()spaces = client.get_organization_spaces(org_id)spaces = client.get_space(space_id)members = client.get_space_members(space_id)apps = client.list_applications()app = client.get_application(app_id)item = client.get_item(item_id)body = {"fields": {"title": "Juan Assignment", "status": 1}}
item = client.create_item(app_id, body)task = client.get_task(task_id)body = {"text": "Text of the task", "description": "desc"}
task = client.create_task(body)labels = client.get_task_labels()hooks = client.list_webhooks(ref_type, ref_id)hook = client.create_webhook(ref_type, ref_id, url, hook_type)client.validate_hook_verification(webhook_id, code)client.delete_webhook(webhook_id)