Skip to content

podio-python is an API wrapper for Podio, written in Python.

License

Notifications You must be signed in to change notification settings

GearPlug/podio-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  1. Get authorization URL
url = client.authorization_url(state=None)
  1. Get access token using code
response = client.get_access_token(code)
  1. 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)

Get task

task = client.get_task(task_id)

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)

Releases

No releases published

Packages

No packages published

Languages