Getting started


ADNPy aims to be an easy-to-use Python client for the API. To get started, you’ll need an access token, which you can get by creating an app on and clicking the “Generate a user token” link.

The Obligatory Hello World Example

import adnpy

# Add an access token to authorize access to your account
adnpy.api.add_authorization_token('your access token here')

# Create a post
post, meta = adnpy.api.create_post(data={'text': 'Hello World'})

This example creates a simple post on your Stream.


Recipes are simple ways to use the API which shield you from having to learn about resources, entities, annotations, and all of that – find out more on the Recipes page.


The API class provides methods for each endpoint. To find more information about each method, check out the API Reference.


API calls normally return APIModel objects. There’s an APIModel for each common resource, like Post, User, and Channel. APIModels are essentially just subclasses of dict, with extra syntacical sugar allowing you to access information via dot notation or normal dict methods:

# given a post object
print post.text
print post.get('text')
print post.get('user', None)

Each model can also preform certain API calls customized to the current model instance:


For more information about models, please see the Model Reference.