Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

pypm install chatter

How to install chatter

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install chatter
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
0.1.3 Available View build log
Linux (32-bit)
0.1.3 Available View build log
Linux (64-bit)
0.1.3 Available View build log
Lastest release
version 0.1.3 on Jun 7th, 2012

The minimalist yet fully featured Chatter API class, heavily inspired by Python Twitter Tools (https://github.com/sixohsix/twitter/).



$ easy_install chatter

Even better:

$ pip install chatter

Chatter API overview

See this quickstart tutorial: http://www.salesforce.com/us/developer/docs/chatterapi/Content/quickstart.htm from Salesforce.



client_id = "YOUR_CHATTER_CLIENT_ID" client_secret = "YOUR_CHATTER_CLIENT_SECRET" auth = chatter.ChatterAuth(client_id, client_secret)

instance_url = "YOUR_USER_INSTANCE_URL" access_token = "YOUR_USER_ACCESS_TOKEN" refresh_token = "YOUR_USER_REFRESH_TOKEN"

chatter = chatter.Chatter(auth=auth, instance_url=instance_url,
access_token=access_token, refresh_token=refresh_token)

Get authenticated user's details:

me = chatter.users.me.get()

Note 'GET' is implied, so you can reduce the above to:

me = chatter.users.me()

Get another user's details

other_user = chatter.users["005E0000000FpoxIAC"].get()

Again, this can be reduced:

other_user = chatter.users["005E0000000FpoxIAC"]()

Another way to achieve this, using the '_' magic method:

other_user = chatter.users._("005E0000000FpoxIAC").get()

Updating the authenticated user's Chatter status:

chatter.feeds.news.me.feed_items.post(text="Hello world!")

Occassionally it is necessary to refresh the user's access token, due to session expiration. The underlying ChatterCall class will handle this automatically, however you may wish to be notified of access token changes so you can reflect this in your user model.

It's possible to do this via the access_token_refreshed_callback, pass in a callable, and your callback will get called with the refreshed access token.


def my_callback(access_token):
print "New access_token", access_token
chatter = chatter.Chatter(auth=auth, instance_url=instance_url,
access_token=access_token, refresh_token=refresh_token, access_token_refreshed_callback=my_callback)

The rest is hopefully self-explanatory! :)


Send feedback / questions etc. to:

Subscribe to package updates

Last updated Jun 7th, 2012

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.