Skip to main content

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:

  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)

Project details


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.9.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

podio_python-0.1.9-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page