Skip to content

Instantly share code, notes, and snippets.

@ansara
ansara / .pre-commit-config.yaml
Last active January 10, 2021 23:52
Pre-commit config for Python. Standardizes formatting and enforces best practices across repo.
repos:
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.0.4
hooks:
- id: isort
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.1.3
hooks:
- id: python-safety-dependencies-check
@ansara
ansara / serverless.yml
Last active June 2, 2021 19:07
Serverless AWS config with parameterized naming for staged deployment
# Serverless Framework Version: 2.17.0
app: my-application
org: my-organization
service: my-service
useDotenv: true
plugins:
- serverless-python-requirements
- serverless-dotenv-plugin
- serverless-hooks-plugin
@ansara
ansara / dependabot.yml
Last active January 4, 2021 18:25
Dependabot config. Updates project dependencies to their latest versions with daily and weekly-scheduled automated pull requests
version: 2
updates:
- package-ecosystem: pip
directory: "/"
target-branch: dev
labels:
- "pip dependencies"
schedule:
interval: daily
@ansara
ansara / logging.yml
Last active April 27, 2021 20:18
Python logging.yml config for built-in logging module. Includes verbose error output to rotating file.
version: 1
disable_existing_loggers: False
formatters:
simple:
format: "[%(levelname)s] [%(name)s :: %(funcName)s] - %(message)s"
verbose:
format: "%(asctime)s <PID %(process)d> [%(levelname)s] [%(name)s :: %(funcName)s] - %(message)s"