-
Python's __hash__ function is not a cryptographic hash - 2018 July 14
You may have noticed that Python has an internal hashing method. Please note that this is not suitable as a cryptographic hash. If you need a cryptographic hash please use something else like hashlib.
read more -
Limiting the runtime of Python unit tests - 2018 June 23
If you need to limit the run time of python unit tests you can use the pytest-timeout decorator to do it.
read more -
Pytest fixtures with Flask - 2018 May 27
Recently I've been working on a web API with Flask, here's how I went about making unit tests with pytest work well with Flask and testing the API via requests.
read more -
Enforcing foreign key constraints with SQLite - 2018 May 07
SQLAlchemy when used with SQLite as the backend doesn't enforce foreign key constraints by default, here's how to enable that behavior.
read more -
Python self references - 2018 April 22
This is a bit of Python trivia but Python containers can store items that are self references.
read more -
TIL: Install options for pip in requirements.txt - 2018 February 14
Some things I learned about pip installs from requirements.txt
read more -
TIL: Python import machinery details - 2018 February 09
Some things I learned about imports and stack frames in Python
read more -
Logging uncaught exceptions in Python applications - 2018 February 06
You want to be able to get good logging data from your applications to be able to reduce the amount of time that you require in order to fix issues and debug problems. This is especially important for any unhandled exceptions that crash the program. This tutorial will show you a convenient way of making sure these are logged.
read more -
TIL: Python hashing implementation details - 2017 December 24
Some things I learned about hashing in CPython
read more -
Interfacing Python with C or C++ - 2017 August 25
A catalogue of techniques for interfacing python with compiled code written in c or c++
read more