File: engine_creation.py

package info (click to toggle)
python-odmantic 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,488 kB
  • sloc: python: 8,646; sh: 110; javascript: 45; makefile: 34; xml: 13
file content (6 lines) | stat: -rw-r--r-- 199 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
from motor.motor_asyncio import AsyncIOMotorClient

from odmantic import AIOEngine

client = AsyncIOMotorClient("mongodb://localhost:27017/")
engine = AIOEngine(client=client, database="example_db")