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 tentd

How to install tentd

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install tentd
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
0.1.1 Available View build log
 
License
Apache Software License 2.0
Lastest release
version 0.1.1 on Jan 9th, 2014

A Python tent.io server.

Running pytentd

Running pytentd is easy:

$ tentd

Information on the command line options can be found with:

$ tentd --help

To run pytentd with gunicorn:

$ gunicorn "tentd:create_app()"

Pytentd can be run under Apache using these instructions and a wsgi file with the following contents:

from tentd import create_app

application = create_app()

In both the last two examples, the create_app function can take either the name of a configuration file (for an example see ./tentd.conf.example) or a dictionary of configuration values.

The Flask documentation also has instructions for running an application on other servers: Deploying on Other Servers.

Installation

The pytentd package can be installed with pip:

pip install git+git://github.com/ravenscroftj/pytentd.git

The pytentd package can be also installed directly from the git repository:

git clone git+git://github.com/ravenscroftj/pytentd.git
cd pytentd
python setup.py install

Pytentd requires a mongoDB database - packages for this are available for most operating systems. More information on starting and stopping the mongoDB server can be found in the mongoDB documentation, though some distributions (such as Ubuntu) will run mongoDB as a service once the package is installed.

Configuration

pytentd can load a configuration file into the Flask application, using the --conf [filename] command line option. This file should be a python file containing capitalised variables.

  • SINGLE_USER_MODE: Single user mode allows pytentd to skip the entity name section of the url in order to only provide for a single entity. This should be set to the name of a entity in the db to use, or None to run the server in multi-user mode (which is the default).
  • THREADED: Threaded mode is on by default, and is needed so that flask can fetch urls that it provides. It is not needed for single user mode and is only used when running tentd from the command line.

Documentation is available on the configuration variables for Flask and Flask-MongoEngine.

Contributing

Coding Style

We use Google's Python style guide with a couple changes:

  • Imports of global objects are acceptable, with the from ... import ... style being preferred.
  • String.format() should be used instead of the coercion operator (%).

You should also try to write tests for any new code, which helps to ensure bugs get picked up more quickly.

We currently hang around in #os on irc.aberwiki.org, feel free to join and come and chat to us :)

Running tests

To run the tests on the installed pytentd package:

python -m unittest discover tentd

To run the tests on the pytentd source:

cd pytentd
python setup.py test
Other tools

nose and sniffer are both useful test runners. Nose alone makes running tests a little easier, and can run the tests both from the source or on an installed module. Sniffer is a tool built on top of nose, and will run the tests each time the source is modified.

While developing, pyflakes and pylint are useful for checking code quality.

License

pytentd is licensed under the Apache License 2.0. For details, see the LICENSE file.

Subscribe to package updates

Last updated Jan 9th, 2014

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.