A fast, async ORM for Python, that's easy to learn

Benefits

  • Supports Postgres and SQLite
  • Async and sync support
  • A builtin playground - which makes learning a breeze
  • Tab completion support - works great with iPython and VSCode
  • Batteries included - a User model, authentication, migrations, an admin, and more
  • Modern Python - fully type annotated
  • Built for web developers and data scientists

Examples

Select

await Band.select(
    Band.name
).where(
    Band.popularity > 100
).run()

Join

await Band.select(
    Band.name,
    Band.manager.name
).run()

Delete

await Band.delete().where(
    (Band.band_members == 0) | (Band.manager.status == 'disabled')
).run()

Update

await Band.update({Band.members: 5}).where(
    Band.name == 'Pythonistas'
).run()

Or, alternatively:

band = await Band.objects().where(Band.name == 'Pythonistas').first().run()
band.members = 5
await band.save().run()

Getting started

Read the docs, and learn the basics in 5 minutes.