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 tahrir-api

How to install tahrir-api

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install tahrir-api
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1.7
0.3.0Never BuiltWhy not?
0.1.7 Available View build log
0.1.3.1 Available View build log
Windows (64-bit)
Mac OS X (10.5+)
0.1.7
0.3.0Never BuiltWhy not?
0.1.7 Available View build log
0.1.3.1 Available View build log
Linux (32-bit)
0.1.7
0.3.0Never BuiltWhy not?
0.1.7 Available View build log
0.1.3.6 Available View build log
0.1.3.4 Available View build log
0.1.3.1 Available View build log
Linux (64-bit)
0.3.0 Available View build log
0.1.7 Available View build log
0.1.3.6 Available View build log
0.1.3.4 Available View build log
0.1.3.1 Available View build log
 
Author
License
GPLv3+
Depended by
Lastest release
version 0.3.0 on Jan 9th, 2014

Tahrir-API

API for interacting with the Tahrir database. Based on the Tahrir database model written by Ralph Bean. There are two classes that can be used in this module. The first is the TahrirDatabase class located in tahrir_api.dbapi and the second is the database model located in tahrir_api.model. The TahrirDatabase class is a high level way to interact with the database. The model is used for a slightly more low level way of interacting with the database. It allows for custom interactions with the database without having to use the TahrirDatabase class.

Creating a Badge

This is an example of creating a badge via Tahrir-API:

System Message: ERROR/3 (<string>, line 19)

Unknown directive type "code-block".

.. code-block:: python

    from tahrir_api.dbapi import TahrirDatabase


    db = TahrirDatabase('backend://badges:badgesareawesome@localhost/badges')

    origin = 'http://foss.rit.edu/badges'
    issuer_name = 'FOSS@RIT'
    org = 'http://foss.rit.edu'
    contact = 'foss@rit.edu'

    issuer_id = db.add_issuer(origin, issuer_name, org, contact)

    badge_name = 'fossbox'
    image = 'http://foss.rit.edu/files/fossboxbadge.png'
    desc = 'Welcome to the FOSSBox. A member is you!'
    criteria = 'http://foss.rit.edu'

    db.add_badge(badge_name, image, desc, criteria, issuer_id)


Awarding a Badge

This is an example of awarding a badge via Tahrir-API:

System Message: ERROR/3 (<string>, line 46)

Unknown directive type "code-block".

.. code-block:: python

    from tahrir_api.dbapi import TahrirDatabase


    db = TahrirDatabase('backend://badges:badgesareawesome@localhost/badges')

    badge_id = 'fossbox'
    person_email = 'person@email.com'
    issued_on = None

    db.add_person(person_email)
    db.add_assertion(badge_id, person_email, issued_on)

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:3

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.