Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Python wrapper for Basecamp Next

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 basecampx
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.rst
Octocat-spinner-32 setup.py
README.rst

Python Wrapper for Basecamp Next

First, you need to ask user's permission to access her data:

from basceampx.auth import Auth
auth = Auth('clientid', 'clientsecret', 'http://my_app/handle_redirect')
authorize_url = auth.authorize_url()

Redirect the user to the authorize_url. After user grants you access, get the access token:

token = auth.access_token(code)['access_token']

Find the accounts that this user has:

from basecampx import Client
client = Client(token, 'YourAppName')
bcx_account = client.basecamp_accounts()[0]

Use a user's Basecamp Next account to access data in projects:

client = Client(token, 'YourAppName', bcx_account['id'])

from basecampx import Projects
project_list = Projects(client).list()
project_names = [project['name'] for project in project_list]

Get all discussions in a project:

messages = Projects(client, 12345).topics.list()
Something went wrong with that request. Please try again.