--- a
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,69 @@
+ci:
+  autofix_commit_msg: ':robot: pre-commit auto fixes [...]'
+  autoupdate_commit_msg: ':robot: pre-commit autoupdate'
+repos:
+  - repo: https://github.com/executablebooks/mdformat
+    rev: 0.7.16
+    hooks:
+    - id: mdformat
+      # Optionally add plugins
+      additional_dependencies:
+      - mdformat-gfm
+      - mdformat-black
+      - mdformat-shfmt
+  - repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: v4.4.0
+    hooks:
+      - id: check-added-large-files
+        args: ['--maxkb=50000']
+      - id: check-ast
+      - id: check-json
+      - id: check-merge-conflict
+      - id: check-symlinks
+      - id: check-toml
+      - id: check-xml
+      - id: check-yaml
+      - id: destroyed-symlinks
+      - id: detect-private-key
+      - id: end-of-file-fixer
+      - id: mixed-line-ending
+      - id: name-tests-test
+        args: ['--django']
+      - id: pretty-format-json
+      - id: requirements-txt-fixer
+      - id: trailing-whitespace
+        exclude: 'setup.cfg'
+  - repo: https://github.com/pycqa/isort
+    rev: 5.12.0
+    hooks:
+      - id: isort
+  - repo: https://github.com/psf/black
+    rev: 23.3.0 # Replace with any tag/version: https://github.com/psf/black/tags
+    hooks:
+      - id: black
+        language_version: python3
+        additional_dependencies: ['click==8.0.4']  # Currently >8.0.4 breaks black
+  - repo: https://github.com/PyCQA/flake8
+    rev: 6.0.0
+    hooks:
+      - id: flake8
+        additional_dependencies: [
+          bandit, # Dependency for flake8-bandit
+          flake8-bandit, # Security checks (currently breaks with bandit > 1.7.2)
+          flake8-bugbear, # Detect potential bugs
+          flake8-builtins, # Check for built-ins being used as variables
+          flake8-cognitive-complexity, # Check max function complexity
+          flake8-comprehensions, # Suggestions for better list/set/dict comprehensions
+          flake8-expression-complexity, # Check max expression complexity
+          flake8-fixme, # Check for FIXME, TODO, and XXX left in comments
+          flake8-isort, # Check import ordering
+          flake8-logging-format, # Validate (lack of) logging format strings
+          flake8-mutable, # Check for mutable default arguments
+          flake8-pie, # Misc. linting rules
+          flake8-pytest-style, # Check against pytest style guide
+          flake8-return, # Check return statements
+          flake8-simplify, # Suggestions to simplify code
+          flake8-sql, # Check SQL statement style
+          flake8-use-fstring, # Encourages use of f-strings vs old style
+          pep8-naming, # Check PEP8 class naming
+        ]