My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for

Documentation

If you'd like to see more examples or want more information about how to use the library, please file a feature request in our issue tracker explaining what you'd like to see.

GettingStarted  
Downloading and installing the Python client library.
Featured
Updated Sep 29, 2009 by api.kurrik.g00g1e

This client library helps you work with social network data from your web server. This document will help explain where you can obtain the files for the client library, and how to use them in your own projects.

Obtaining the client library

There are two options for obtaining the files for the client library.

Obtaining the pre-packaged release

Most developers will want to use the pre-packaged release, which is released according to the project roadmap and will be the most stable version of the library.

To download the library, go to the Downloads tab. The most recent release of the library will be listed, typically with a few different archive types (.zip, .tar.gz, .tar.bz). There is no difference between the different archive formats - please select one supported by your operating system.

After extracting the library from the archive, you will have a new opensocial-python-client directory. The library files themselves are in the opensocial-python-client/src/opensocial directory.

Obtaining the most up-to-date version from SVN

The most up-to-date version of the code is available from this project's SVN repository. Obtaining the code this way is intended for developers looking for fixes or features that have not been released in the pre-packaged version, or for developers who want to contribute patches back to the project.

Obtain the code by using the following SVN checkout command (you will need an SVN client installed on your computer):

  svn checkout http://opensocial-python-client.googlecode.com/svn/trunk/ opensocial-python-client

After checking out the code, you will have a new opensocial-python-client directory. The library files themselves are in the opensocial-python-client/src/opensocial directory.

What to do with the files

After obtaining the library in either of the ways described above, you will have a directory named opensocial-python-client somewhere on your filesystem, containing a file named setup.py.

Install the library as a Python module

To install the library as a system module, run

python setup.py install

Once installed, you will be able to import the opensocial module in your scripts by using the following:

  import opensocial

Copy the opensocial directory into your project

In certain cases, you will not be able to install the OpenSocial client library as a system module (for example, App Engine). You can include a copy of the src/opensocial directory for each project you write. For example, if your project structure looks like this:

  myproject/
    |- myproject.py

Copy the opensocial-python-client/src/opensocial directory into the myproject directory. You can then add the following code to myproject.py to include the client library:

  import opensocial

Running Unit Tests

To run all unit tests, simply run the following from the /tests directory:

  python run_all_tests.py
Comment by loic-goo...@dachary.org, Jul 11, 2009

A Debian GNU/Linux package is available at http://opensocial.pokersource.info/ and should show up around August 2009 in the official repositories (see the corresponding ITP at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=536603 )


Sign in to add a comment
Powered by Google Project Hosting