A nice micro orm for python, mysql only.
Project description
A nice micro orm for python, mysql only.
Sample Usage
>>> from models import User
>>> user = User(name='Tom', email='tom@gmail.com')
>>> user.save() # insert
1L
>>> user.email = 'tom@github.com'
>>> user.save() # update
1L
>>> [user.name for user in User.select()] # select
[u'Tom']
>>> query = User.where(name='Tom').delete()
>>> query.execute() # delete
1L
>>> user = User.create(name='Kate', email='kate@gmail.com') # another insert
>>> user.data
{'email': 'kate@gmail.com', 'name': 'Kate', 'id': 2L}
>>> user.destroy() # another delete
1L
Installation
$ pip install skylark
Links
NOTICE: skylark may not be stable before version 1.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
skylark-0.7.1.tar.gz
(7.5 kB
view details)
File details
Details for the file skylark-0.7.1.tar.gz
.
File metadata
- Download URL: skylark-0.7.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbfc31721760e4bc731b0d5e9726c4c2a3a241d5b4c3b068d04d7604bea025a1 |
|
MD5 | 310a3213517d5db98af504313649ee86 |
|
BLAKE2b-256 | 73a64a3bdd8881afb4cb4fdcd14905cd2b0104013b551120f99389d0f5d2ce4e |