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 giotto

How to install giotto

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install giotto
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
0.9.7
0.10.5Never BuiltWhy not?
0.9.7 Available View build log
0.9.5 Available View build log
0.0.2 Failed View build log
Linux (64-bit)
0.9.5
0.10.5Never BuiltWhy not?
0.9.5 Available View build log
0.0.2 Failed View build log
0.10.5 Available View build log
 
Author
License
LICENSE
Lastest release
version 0.10.5 on Sep 20th, 2013

What is Giotto?

Giotto is a python web framework. It encourages a functional style where model, view and controller code is strongly decoupled.

Key Features of Giotto include:

  • Extremely terse code. A full featured blog application is under 300 lines of code (including templates)
  • Generic views, generic models and multiple pluggable controllers.
  • Free RESTful interface along with your normal "browser POST" CRUD site.
  • Functional CRUD patterns that do away with the need for django-style form objects.
  • Automatic URL routing.
  • Built in cache (supports Redis and Memcache, and an API for supporting any other engines)
  • SQLAlchemy for database persistence.
  • Jinja2 for HTML templates (with an API for extending for other template engines)

Getting started

Install and create base project files:

pip install giotto
mkdir demo
giotto create http

Now your project is initialized. Open the manifest.py and add the following:

from giotto.programs import ProgramManifest, GiottoProgram
from giotto.views import jinja_template, BasicView

def multiply(x, y):
    x = int(x or 0)
    y = int(y or y)
    return {'x': x, 'y': y, 'result': x * y}

manifest = ProgramManifest({
    'multiply': GiottoProgram(
        model=[multiply],
        view=BasicView(
            html=jinja_template('multiply.html'),
        ),
    ),
})

Now create a file called multiply.html:

<!DOCTYPE html>
<html>
    <body>
        {{ data.x }} * {{ data.y }} == <strong>{{ data.result }}</strong>
    </body>
</html>

Or if you're too lazy to make a template, set the view keyword argument to just BasicView() to use the generic view.

Run the development server:

$ giotto http --run

Point your browser to http://localhost:5000/multiply?x=3&y=3. Additionaly, try http://localhost:5000/multiply.json?x=3&y=3. You can also invoke your multiply program through the command line:

$ giotto create cmd
$ giotto cmd multiply --x=4 --y=2

Also:

$ giotto cmd multiply.html --x=4 --y=2

You can also use positional arguments:

$ giotto cmd multiply/4/6

Links:

  • To discuss Giotto, please visit the Google Group
  • Read Giotto's documentation.
  • Check out giottoblog, a full featured blog application written with the Giotto framework.

Subscribe to package updates

Last updated Sep 20th, 2013

Download Stats

Last month:1

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.