Skip to main content

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

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

CURD.py-0.5.0.tar.gz (7.1 kB view details)

Uploaded Source

File details

Details for the file CURD.py-0.5.0.tar.gz.

File metadata

  • Download URL: CURD.py-0.5.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for CURD.py-0.5.0.tar.gz
Algorithm Hash digest
SHA256 d7f4213329c4005faf628d0cf443f28c8617979e838dc68066041aedd9fdb0eb
MD5 19b825e94bd06e1ec125f11b9225f4f5
BLAKE2b-256 525082c0cc95c1aa858c99d10402913595f427bb8fafbaa300a42cca824a7515

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page