De Stoq Wiki
Revisão de 20h25min de 13 de fevereiro de 2012 por Johan Dahlin (Discussão | contribs) (Reportlab)

(dif) ← Edição anterior | Revisão atual (dif) | Versão posterior → (dif)
Ir para: navegação, pesquisa


PostgreSQL is the database storage for Stoq. It makes it possible to use stoq over the network. Almost all persistent data is stored in postgres, the exceptions are user settings which is stored on the local disk.

The preferred way of setting up postgres when running in a development mode is to create a user and database with the same name as your username. That way you don't need to change the database access configuration (pg_hba.conf)

We access PostgreSQL via the python bindings and via the psql command line tool when creating schemas and applying database patches.


Stoq is written in the Python programming language. It's a dynamic, modern, popular language which comes with batteries included.

The reason for using python is that it's very high-level and makes it faster to write code and easy to teach new people how to use it.

There are two versions of python that are incompatible, Python 2 and 3. We currently depend on Python 2.6, we plan to move to Python 3 in the future, when all of our dependencies are ported over and available in a popular distribution, it might happen during 2012, but more likely to happen 2013.


The user interface in Stoq is written Gtk via PyGTK the python bindings. It's the toolkit for the GNOME desktop environment which is shipped with the Ubuntu Linux distribution. GTK is cross-platform and works on Windows and Mac OS X as well.


Kiwi is a framework written on top of PyGTK that makes it easier to create business applications. It contains an MVC-framework, validation, distribution, localization, translation, currency, search components etc.


Stoqdrivers contain ECF printer driver for a few popular brands.


Dateutil is a date library which is useful to calculate intervals and date deltas.


Twisted is an asynchronous event driven framework which is used in Stoq to do network communication with online and web services.


Reportlab is a PDF generation library, it's used to create reports in Stoq.


SQLObject is an Object Relational Mapper used to abstract away the need to write SQL statements by hand.

Outras bibliotecas

Other libraries used in a few different places: