Skip to main content

A light weight python ORM without models.

Project description

https://img.shields.io/pypi/v/lorm.svg

Lorm is a light weight ORM library for Python, model-less, Django style lookup expressions. It’s very suitable for small scripts.

Installation

The last stable release is available on PyPI and can be installed with pip:

$ pip install lorm

Example

CREATE TABLE `pets` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL DEFAULT '',
  `add_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
>>> c = lorm.mysql_connect('localhost', 3306, 'root', 'root', 'test')
>>> id = c.pets.create(name='cat')
1
>>> c.pets.get(id=id)
{u'id': 2, u'name': u'cat'}

For more examples, see test.py and source code.

Features

  • No Model, use table name directly.

  • Auto reconnect

  • Connection pool

  • Django style lookup expressions

  • Threading safe

Requirements

  • pymysql

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

lorm-0.2.10.zip (9.1 kB view details)

Uploaded Source

File details

Details for the file lorm-0.2.10.zip.

File metadata

  • Download URL: lorm-0.2.10.zip
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for lorm-0.2.10.zip
Algorithm Hash digest
SHA256 2bf684879d0e38b27d2cb7b999c0922107643adca7c03a36039de870869acd43
MD5 fd7daf8f06c0456079d4061e7399b145
BLAKE2b-256 36767a1ed287a2ce18450c34468a063075bc2c35ad24aaf48594c828db80291f

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