Ormageddon
Asynchronous ORM framework for Python
Install / Use
/learn @renskiy/OrmageddonREADME
ORMageddon
ORMageddon is asynchronous ORM framework based on peewee. For now it supports only PostgreSQL using aiopg.
Status
Currently ORMageddon is only a proof of concept demonstration and is not ready for production yet. Please contact me if you are interested in further development of the project.
Some examples
You can test ORMageddon using following little example:
import ormageddon
db = ormageddon.PostgresqlDatabase(database='ormageddon', user='postgres', host='127.0.0.1')
class User(ormageddon.Model):
class Meta:
database = db
id = ormageddon.PrimaryKeyField()
async def get_user(user_id):
return await User.get(User.id == user_id)
async def print_users(start=None, stop=None):
async for user in User.select()[start:stop]:
print(user)
async def create_user():
user = User()
await user.save()
Transactions
async def manual_transaction():
await db.begin()
try:
# do whatever you need
except:
await db.rollback()
raise
else:
await db.commit()
async def transaction_context():
async with db.transaction() as transaction:
# do whatever you need
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
