GitHub - joaopalmeiro/template-python-venv-script: Opinionated Python + venv template for new scripts. (original) (raw)

template-python-venv-script

Ruff

Opinionated Python + venv template for new scripts.

Getting Started

  1. Go to or create the project folder.
  2. Get the template files:

npx degit github:joaopalmeiro/template-python-venv-script

or

npx degit github:joaopalmeiro/template-python-venv-script --force

  1. Search for template-python-venv-script and replace it with the project name.
  2. Search for Opinionated [Python](https://www.python.org/) + [venv](https://docs.python.org/3.10/library/venv.html) template for new scripts. and replace it with the (short) project description.
  3. Search for João Palmeiro and replace it with the author's name.
  4. Open the requirements.txt file and add the project-specific dependencies.
  5. Delete the TEMPLATE.md file.
  6. Delete the Getting Started section.

Development

Install pyenv (if necessary).

pyenv install && pyenv versions

pip config set global.require-virtualenv true

python -m venv --clear venv

python --version && pip --version

pip install -r requirements.txt

or

pip install --index-url https://pypi.org/simple -r requirements.txt