Tags
#python
4 posts
-
SQLAlchemy, OnUpdate & Datetime UTCNOW deprecation in 3.12
Read article →This is a quick post about migrating your
utcnow()tonow(tz=UTC)in SQLAlchemy for youronupdatefunction argument to your SQL Models. -
Big Uploads and Checksum Validation
Read article →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
Read article →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
Read article →Find yourself running a
pytestcommand 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?