Setup Note: Python - takumaw/Configs GitHub Wiki

Python Setup Note

Install Tools

pipx install black
pipx install hatch
pipx install mypy
pipx install pipenv
pipx install poetry
pipx install ruff

Force requests to use host's CA bundle

Put these lines to shell env file:

# Debian-like
export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt

# RHEL-like
export REQUESTS_CA_BUNDLE=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem

Make IPython always apply local dotenv

Create ~/.ipython/profile_default/startup/10-dotenv.py with following content:

import dotenv
dotenv.load_dotenv(override=True)