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

How to install tahrir

  1. Download and install ActivePython
  2. Buy and install the Business Edition license from account.activestate.com
  3. Open Command Prompt
  4. Type pypm install tahrir

tahrir contains builds that are only available via PyPM when you have a current ActivePython Business Edition subscription.

 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1.4
0.1.4 Available View build log
Windows (64-bit)
0.1.4
0.1.4 Available View build log
Mac OS X (10.5+)
0.1.4
0.1.4 Available View build log
Linux (32-bit)
0.1.4
0.1.4 Available View build log
Linux (64-bit)
0.1.4
0.1.4 Available View build log
 
Author
License
AGPLv3+ with additional permission

Tahrir is Arabic for Liberation.

Tahrir is also a Pyramid app for issuing your own Open Badges.

The name is total overkill.

System Message: WARNING/2 (<string>, line 2); backlink

Duplicate explicit target name: "here".

You can see Tahrir deployed in production here. The staging instance lives here.

Installing... just to try it out

You can always:

$ pip install tahrir

Deploying for reals

It's packaged for Fedora and epel6. The authors use an Ansible playbook to deploy Tahrir in production.

System Message: WARNING/2 (<string>, line 2); backlink

Duplicate explicit target name: "here".

System Message: WARNING/2 (<string>, line 2); backlink

Duplicate explicit target name: "here".

System Message: WARNING/2 (<string>, line 2); backlink

Duplicate explicit target name: "here".

You can find our repo here, our playbook here, and our tahrir role here.

Building a configuration file

Get a sample configuration file:

$ wget https://raw.github.com/fedora-infra/tahrir/master/production.ini -O
tahrir.ini

Edit it to your liking. In particular you will need to change the following values under the [server:main] section:

  • host = yoursite.com
  • port = 80

And the following values under the [app:pyramid] section:

  • tahrir.admin = "comma-delimited list of admin email addresses"
  • tahrir.title = "just badgin' around"
  • tahrir.pngs.uri = /home/user/badges/pngs
  • tahrir.base_url = "yoursite.com"

Setting up the DB

Run the following command before starting the server:

$ initialize_tahrir_db tahrir.ini

Running

Start the server like so (subsitute tahrir.ini with the .ini file you want to use:

$ pserve tahrir.ini

You can pass the --reload flag to this command to automatically restart the server in the event that the code is altered.

Reporting Bugs

If you find bugs in Tahrir or have ideas for enhancements, please report them at http://github.com/fedora-infra/tahrir/issues.

Hacking

If you'd like to contribute to Tahrir or just poke at the code, you can use the following instructions to set up a development environment.

Create an account on Fedora Account Systems (FAS) at https://admin.fedoraproject.org/accounts. Make sure you have Python 2.7 or above installed on your system. Then, install the Python version of virtualenvwrapper (in Fedora):

$ sudo yum -y install python-virtualenvwrapper

In Ubuntu, you can do the same with:

$ sudo apt-get install python-setuptools
$ sudo apt-get install python-virtualenv
$ sudo easy-install pip
$ sudo pip install python-virtualenvwrapper

After installing virtualenvwrapper, you'll need to set it up for the first time:

$ export WORKON_HOME=~/.virtualenvs/
$ mkdir -p $WORKON_HOME
$ source /usr/local/bin/virtualenvwrapper.sh

You'll want to add source /usr/local/bin/virtualenvwrapper.sh to your .bashrc.

Then, to set up Tahrir, follow these steps:

$ git clone git://github.com/fedora-infra/tahrir.git
$ cd tahrir
$ mkvirtualenv tahrir
(tahrir)$ python setup.py develop
(tahrir)$ initialize_tahrir_db development.ini
(tahrir)% pserve --reload development.ini

The pserve command should output "starting HTTP server on https://localhost:6543". Login to https://localhost:6543 in your web browser using your FAS account username and password. In order to make yourself an admin of the local copy of tahrir, edit the "development.ini" file by changing the value to "YOUR_FAS_USERNAME@fedoraproject.org" and login. You should now be able to see the admin view of tahrir in your local copy at http://localhost:6543/admin.

Windows (32 and 64 bit versions):

For problems like:

c:\env\tahrir>c:\env\Scripts\initialize_tahrir_db development.ini
Error: pkg_resources.DistributionNotFound: simplejson

and:

c:\env\tahrir>c:\env\Scripts\easy_install simplejson
Error: raise ValueError(str(list(result.keys())))
ValueError: [u'path']

Follow these instructions:

  1. Download and install mingw from http://code.google.com/p/mingw-builds/downloads/detail?name=i686-mingw32-gcc-4.7.0-release-c,c%2b%2b,fortran-sjlj.zip&can=2&q= Extract the contents of this folder to c:\mingw.

  2. Download and install setuptools if not already present. This can be done by running ez_setup.py from c:Python2x.

  3. Create a configuration file for distutils i.e. create a file distutils.cfg at the following location:

    C:\Python2x\Lib\distutils\distutils.cfg
    

    Add the following line to it:

    [build] compiler=mingw32
    
  4. Now open command prompt and use easy_install to install simplejson:

    C:\env\tahrir>c:\env\Scripts\easy_install simplejson
    

This will install simplejson in Python2xLibsite-packages. A few other packages -- namely httplib2 -- may have to be installed the same way before the initialize_tahrir_db command can be executed.

Subscribe to package updates

Download Stats

Last month:2

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.