Tiny Python ORM for MySQL
Project description
Tiny Python ORM for MySQL.
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 CURD.py
Links
NOTICE: CURD.py may not be stable before version 1.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
CURD.py-0.4.1.tar.gz
(11.2 kB
view details)
File details
Details for the file CURD.py-0.4.1.tar.gz
.
File metadata
- Download URL: CURD.py-0.4.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c005e80edf3075314d8c02d387dda0638a3382ce6ca6d2561796fd454dda175c |
|
MD5 | f7f3cd7bdc0bc1e3cf1b17dff0994d44 |
|
BLAKE2b-256 | 6b4ba151efb05cc32b8972af06b30546587820db40125ff5e06ba987fd95ac24 |