srcmain.pydb.pymodels.pytasks.pytests/
main.pydb.py
1from fastapi import FastAPI, Depends
2from .db import Orders, session
3
4app = FastAPI()
5
6@app.get("/api/orders/{id}")
7async def get_order(id: int, db=Depends(session)):
8# cached, typed and tested
9order = await Orders.get(db, id)
10return order.model_dump()
✓ 128 tests passedcoverage 94 %Python 3.13
Python4 min read
Automation with Python: Routine Work Your People Don't Have to Do by Hand
Copying data between systems, weekly Excel reports, checking invoices. Here is which tasks are worth automating with Python, what a simple script looks like, and what to watch out for so your automation doesn't quietly stop working.