Skip to main content

A micro python orm for mysql and sqlite.

Project description

A micro python orm for mysql and sqlite.

Sample Usage

>>> 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

Installation

$ pip install skylark

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.9.0.tar.gz (8.7 kB view details)

Uploaded Source

File details

Details for the file skylark-0.9.0.tar.gz.

File metadata

  • Download URL: skylark-0.9.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for skylark-0.9.0.tar.gz
Algorithm Hash digest
SHA256 ccffeed6e1740c5f8bd550cf2e2bf4b3125de01e8683d96dd431504810b8af45
MD5 fc0e4b91f6c456f2f7d135d5ded1f4d4
BLAKE2b-256 31680633664c799a7dbd2976760e3d24bc9bb960be6b5309a92eb5ae31407ffb

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