yc850k / skylark

:snake: A micro python orm for mysql and sqlite3. ( Development status: 4 - Beta)

Home Page:http://skylark.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A micro python orm for mysql and sqlite3. (Original named CURD.py).

Latest version: v0.9.0

Development status: 4 - Beta

Testing status: Build Status

Sample Code

>>> 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.data
{'email': 'kate@gmail.com', 'name': 'Kate', 'id': 2}
>>> user.destroy()  # another delete
1

More examples: sample/, snippets

Requirements

Install

$ pip install skylark

Documentation

Documentation: http://skylark.readthedocs.org/

Strongly recommend that you read Quick Start at first.

NOTE: skylark is not currently threading safe.

Sample App

Tests

License

LICENSE-BSD

Changes

CHANGES

About

:snake: A micro python orm for mysql and sqlite3. ( Development status: 4 - Beta)

http://skylark.readthedocs.org/

License:BSD 2-Clause "Simplified" License


Languages

Language:Python 96.1%Language:CSS 2.1%Language:HTML 1.9%