🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

skylark

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skylark

A micro python orm for mysql and sqlite.

0.9.1
Maintainers
1

skylark

A micro python orm for mysql and sqlite.

Sample Usage


.. code:: python

    >>> from models import User
    >>> user = User(name='Tom', email='tom@gmail.com')
    >>> user.save()  # insert
    1
    >>> user.email = 'tom@github.com'
    >>> user.save()  # update
    1
    >>> [user.name for user in User.select()]  # select
    [u'Tom']
    >>> query = User.where(name='Tom').delete()
    >>> query.execute()  # delete
    1
    >>> user = User.create(name='Kate', email='kate@gmail.com')  # another insert
    >>> user
    {'email': 'kate@gmail.com', 'name': 'Kate', 'id': 2}
    >>> user.destroy()  # another delete
    1

Installation

.. code:: bash

$ pip install skylark

Links


* `Documentation <http://skylark.readthedocs.org/>`_
* `Code on Github <https://github.com/hit9/skylark>`_

**NOTICE**: skylark may not be stable before version 1.0

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts