skip to navigation
skip to content

Not Logged In

CURD.py 0.4.0

Tiny Python ORM for MySQL

Latest Version: 0.5.0

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
 
File Type Py Version Uploaded on Size
CURD.py-0.4.0.tar.gz (md5) Source 2014-01-04 10KB
  • Downloads (All Versions):
  • 197 downloads in the last day
  • 286 downloads in the last week
  • 704 downloads in the last month