.. sql-helper documentation master file, created by
sphinx-quickstart on Thu Feb 14 22:47:45 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
MoSQL --- More than SQL
=======================
.. image:: https://travis-ci.org/moskytw/mosql.png
:target: https://travis-ci.org/moskytw/mosql
.. .. image:: https://pypip.in/v/mosql/badge.png
.. :target: https://pypi.python.org/pypi/mosql
.. .. image:: https://pypip.in/d/mosql/badge.png
.. :target: https://pypi.python.org/pypi/mosql
It lets you use the common Python data structures to build SQLs.
It is the slide of the talk, "MoSQL: More than SQL, but Less than ORM", at
`PyCon APAC 2013 `_. It introduces MoSQL after v0.6.
.. raw:: html
The main features:
1. Easy-to-learn --- Everything is just a plain Python object or SQL keyword.
2. Flexible --- The query it builds fully depends on the structure you provide.
3. Secure --- It prevents the SQL injection from both identifier and value.
4. Fast --- It simply translates the Python data structures into SQLs.
It is just more than SQL.
.. raw:: html
MoSQL is Elegant
----------------
Here we have a dictionary which includes the information of a person::
>>> mosky = {
... 'person_id': 'mosky',
... 'name' : 'Mosky Liu',
... }
And we want to insert it into a table named person. It is easy with
:mod:`mosql.query`::
>>> from mosql.query import insert
>>> print(insert('person', mosky))
INSERT INTO "person" ("person_id", "name") VALUES ('mosky', 'Mosky Liu')
.. seealso::
Check :doc:`/query` for detail, or there are `examples
`_ which interact with
real database.
Like it?
--------
It is available on PyPI::
$ sudo pip install mosql
Or clone the source code from `GitHub `_::
$ git clone git://github.com/moskytw/mosql.git
Read More
---------
.. toctree::
:maxdepth: 2
query
util
patches
db
The Changes
-----------
.. toctree::
:maxdepth: 2
changes
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`