Changes between Initial Version and Version 1 of OpenData


Ignore:
Timestamp:
Sep 6, 2011, 1:32:24 PM (13 years ago)
Author:
Jacob
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenData

    v1 v1  
     1{{{
     2#!rst
     3====================
     4Django's data portal
     5====================
     6
     7Inspired by David Eaves, here's some information on accessing Django's
     8contribution data.
     9
     10.. contents:: What's available:
     11
     12Please take it, mash it up, and let show us the results!
     13
     14If there's other data you'd like to see, please get in touch (``jacob -at- jacobian.org``) and let me know what you'd like to see. I'll do my best!
     15
     16Trac's database
     17===============
     18
     19Data dumps out of Trac, our ticket tracking software.
     20
     21There's two ways to access the data: `Trac's RPC interface`_ and the `daily
     22data dumps`_.
     23
     24Trac's RPC interface
     25--------------------
     26
     27Trac has a XML-RPC and JSON-RPC interface. You view some documentation of these
     28APIs at::
     29
     30    https://code.djangoproject.com/xmlrpc
     31
     32.. note::
     33
     34    **You'll need to be logged in to access this page** and to access the data. If you need to create an account, the sign-up page is at https://www.djangoproject.com/accounts/register/.
     35
     36The base URLs you'll use for for the XML-RPC and JSON-RPC APIs is::
     37
     38    https://{username}:{password}@code.djangoproject.com/login/rpc
     39
     40The easiest way to access these APIs is with Python's `xmlrpclib`_ library.
     41Here's a quick example::
     42
     43    >>> import xmlrpclib
     44    >>> rpc_url = "https://USERNAME:PASSWORD@code.djangoproject.com/login/rpc"
     45    >>> trac = xmlrpclib.ServerProxy(rpc_url)
     46
     47    # Get a single ticket's info.
     48    >>> ticket, time_created, time_changed, attributes = trac.ticket.get(1337)
     49    >>> attributes['resolution']
     50    'wontfix'
     51
     52    # Perform a search. - counts the open (i.e. not-closed) tickets.
     53    # Query syntax is documented at http://trac.edgewall.org/wiki/TracQuery#QueryLanguage
     54    >>> not_closed = trac.ticket.query('status=!closed&max=5000')
     55    >>> len(not_closed)
     56    1850
     57
     58Please be careful here. There are APIs that write data and using them could
     59look like spam, so please ask me (``jacob -at- jacobian.org``) for permission
     60first!
     61
     62.. _xmlrpclib: http://docs.python.org/library/xmlrpclib.html
     63
     64Daily data dumps
     65----------------
     66
     67These are direct data dumps of the Trac database, collected nightly, in various
     68formats. They're sanitized to remove some tables with senstive info (session
     69data, etc.) but are otherwise complete.
     70
     71Dumps are currently available in the following formats:
     72
     73    * CSV_ (tar'd & bzipped directory; one CSV file per table; ~35MB).
     74
     75.. _csv: https://www.djangoproject.com/m/data/django-trac-csv.tar.bz2
     76
     77The database schema is documented at
     78http://trac.edgewall.org/wiki/TracDev/DatabaseSchema. The most interesting
     79tables are probabably the ``ticket`` and ``ticket_change`` tables.
     80``ticket_change``, in particular, contains each change ever made to a ticket
     81and so probably has some of the most itnersting data available.
     82
     83Mashups
     84=======
     85
     86If you create a mashup, please add it here!
     87
     88    * `Django Development Dashboard`_ (by JKM).
     89
     90.. _django development dashboard: http://dddash.ep.io/
     91
     92Questions?
     93==========
     94
     95If you've got questions, please contact JKM (``jacob -at- jacobian.org``).
     96
     97}}}
Back to Top