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.

Download
ActivePython
INSTALL>
pypm install peerreach

How to install peerreach

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install peerreach
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
0.2 Available View build log
 
License
GPL
Dependencies
Imports
Lastest release
version 0.2 on Jan 9th, 2014

peerreach is a python library to access the api from http://peerreach.com

For more infor about the api go to http://peerreach.com/api/overview

The last source code ant hte bugtracking is at http://bitbucket.org/ferranp/peerreach

Install

Install using pip:

pip install peerreach

or using easy_install:

easy_install peerreach

Usage

By now the api does not requre authentiation, so to use is:

import peerreach

api = peerreach.Api()

# lookup one user by screen name
userdata = api.lookup_user(screen_name="user")

# lookup one user by user_id
userdata = api.lookup_user(user_id=12345)

# lookup various users by screen name
usersdata = api.lookup_user(screen_names=("user1", "user2"))

# lookup various users by user_ids
usersdata = api.lookup_user(user_ids=(12345, 54321))

The data returned is a dictionary containing the data returned by the api. You can change the deserializer to get the raw api response or the response as an object:

import peerreach

# with raw data
api = peerreach.Api(parser=peerreach.RawPArser())
rawdata = api.lookup_user(screen_name="user")

# with object
api = peerreach.Api(parser=peerreach.ObjectPArser())
objectdata = api.lookup_user(screen_name="user")

Command Line

The package also includes a command line tool to test the api:

$ peerreach --help
Usage: peerreach [options] screen_name [screen_name...]

Options:
  --version   show program's version number and exit
  -h, --help  show this help message and exit
  -i, --ids   Use twitter ids instead of screen name
  -r, --raw   Show raw peerreach api output

Subscribe to package updates

Last updated Jan 9th, 2014

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.