GithubHelp home page GithubHelp logo

pombredanne / mosql-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from moskytw/mosql

0.0 0.0 0.0 924 KB

Build SQL with native Python data structure smoothly.

Home Page: http://mosql.mosky.tw

License: MIT License

Makefile 0.37% Python 99.37% Batchfile 0.26%

mosql-1's Introduction

https://travis-ci.org/moskytw/mosql.png

The full version of this documentation is at mosql.mosky.tw.

MoSQL --- More than SQL

It lets you use the common Python data structures to build SQLs. Here are 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.

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 mosql.query:

>>> from mosql.query import insert
>>> print(insert('person', mosky))
INSERT INTO "person" ("person_id", "name") VALUES ('mosky', 'Mosky Liu')

Check The Common Queries โ€” mosql.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

mosql-1's People

Contributors

aminzai avatar lucemia avatar moskytw avatar poying avatar uranusjr avatar victorneo avatar xkerman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.