/oppy

oppy is a python wrapper around the ObsidianPortal API (http://help.obsidianportal.com/kb/api)

Primary LanguagePython

README v1.0

This project is meant to allow programmers to access the ObsidianPortal API via Python
(hence the name: "OP" [Obisidian Portal] + "Py" [Python] == "Oppy").

WHAT IT DOES

oppy does the following:

1) It has a bootstrap script that will walk you through the creation of your Obsidian Portal OAuth key/secrets.
2) It can fetch user information me user id or or user name.
3) It can fetch campaign information by campaign id.
4) It can fetch character information.

GETTING STARTED


1) If you don't have it already, install python.  The 3.2 release of python isn't supported by oppy, because the
standard python setupconfig module isn't.  :-(  Head over here: http://www.python.org/getit/releases/2.7.1 to get
the 2.7.1 release of Python.
2) Oppy uses Joe Stump's python oauth module (https://github.com/simplegeo/python-oauth2).  This module, in turn,
uses the standard setupconfig module.  So you'll need to install both.
    a) Download setuptools into a temporary directory.  I'm using the latest from here:
     http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e
    b) Pop open your favorite python enabled command line shell and go to the folder you extracted setuptools in.
    c) Install it: %python setup.py install
    If this works ok, you should see something like the following:

    Installed c:\python27\lib\site-packages\setuptools-0.6c11-py2.7.egg
    Processing dependencies for setuptools==0.6c11
    Finished processing dependencies for setuptools==0.6c11

    d) Download python-oauth2 from https://github.com/simplegeo/python-oauth2/archives/master.  Unpack it into a
    temporary directory of your choice.
    e) Repeat c) above in the folder you extracted oauth2 to.  You should see the following:

     Installed c:\python27\lib\site-packages\httplib2-0.6.0-py2.7.egg
     Finished processing dependencies for oauth2==1.5.167
3) Download oppy from here: https://github.com/lhayhurst/oppy/archives/master.  Unpack it to somewhere on your local computer
4) Run the basic set of unit tests: %python config.py   You should see the following:
$ python config.py
....
----------------------------------------------------------------------
Ran 4 tests in 0.003s

OK
5) You're now ready to bootstrap oppy.  From the command line do: %python bootstrap.py.  oppy will then walk you through
a series of steps to setup your Obsidian Portal oauth consumer tokens and secrets.  You can read a bit more about this
over at http://help.obsidianportal.com/kb/api/api-authentication-oauth
6) You can start using the API to grab data.  I recommend starting with the unit tests in UserAPI.py and CampaignAPI.py,
as both show you how to use their respective API by example.


ABOUT ME

I'm a programmer-turned-manager who still dreams of the glory days of coding.  I'm looking to (re)learn python and
thought that oppy would be a good forum to do that in.  Also my last source control system was subversion, and all
the cool kids are using git/github now, so this helps me learn that too.  Finally, I'm an old-skool D&D fan.  Look for
me as 'sozin' on the pathfinder/paizo places.

Lyle Hayhurst
sozinsky at gmail dot com