Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Python StackExchange client library
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
.travis.yml
LICENSE
README.md
setup.py
stackpy.py
test.py

README.md

What is stackpy?

stackpy is a simple Python wrapper for the StackExchange API v2.

It was written by Kristian Glass for StackCompare.

Currently somewhat alpha.

Getting Started

For the latest stable version:

pip install stackpy

OR for the bleeding edge:

git clone https://github.com/doismellburning/stackpy.git

Examples

Sites

>>> from stackpy import Stackpy
>>> s = Stackpy()
>>> sites = s.sites().items
>>> stackoverflow = [site for site in sites if site.name == 'Stack Overflow'][0]
>>> stackoverflow.site_url
u'http://stackoverflow.com'
>>> stackoverflow.audience
u'professional and enthusiast programmers'

Users

>>> from stackpy import Stackpy
>>> s = Stackpy()
>>> kristian = s.users([928098]).items[0]
>>> kristian.display_name
u'Kristian Glass'

Other StackExchange Sites

>>> from stackpy import Stackpy
>>> s = Stackpy()
>>> kristian = s.users([114764], site='serverfault').items[0]
>>> kristian.display_name
u'Kristian Glass'
Something went wrong with that request. Please try again.