python
SQLAlchemy, OnUpdate & Datetime UTCNOW deprecation in 3.12
This is a quick post about migrating your utcnow() to now(tz=UTC)
in SQLAlchemy for your onupdate function argument to your SQL Models.
Big Uploads and Checksum Validation
Ever wanted to upload big files without storing them in memory as they are being written with FastAPI?
…Mocking the Post Method on an Async HTTPX Post Request
A quick snippet for mocking HTTP requests with an the async httpx context manager.
async with httpx.AsyncClient() as client:
signup_response = await client.post(
f"https://{AUTH0_DOMAIN}/api/v2/users",
data=signup_request_body,
headers=signup_request_headers,
timeout=30,
)…
Testing in the Terminal
Find yourself running a pytest command repeatedly trying to work out
what a problem is and getting sick of clicking back on the terminal
window where the output is and pressing arrow up to re-run the test?
Or even running tests in an IDE and sick of re-running the test
time after time with your mouse?
