Skip to main content

Simple object-relational mapper for SQLite3, includes plugin for Bottle web framework

Project description

Macaron is a small object-relational mapper (ORM) for SQLite on Python. It is distributed as a single file module which has no dependencies other than the Python Standard Library.

Macaron provides easy access way to SQLite database as standalone. And also it can work in Bottle web framework through the plugin mechanism.

Example:

>>> import macaron
>>> macaron.macaronage("members.db")
>>> team = Team.create(name="Houkago Tea Time")
>>> team.members.append(name="Ritsu", part="Dr")
<Member object 1>
>>> mio = team.members.append(name="Mio", part="Ba")
>>> print mio
<Member 'Mio : Ba'>
>>> for member in team.members: print member
...
<Member 'Ritsu : Dr'>
<Member 'Mio : Ba'>
>>> macaron.bake()
>>> macaron.cleanup()

Supported by

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