Skip to main content

Python Project Package Template

Project description

Python Project Template

Install dependencies

Install pipenv to manage dependencies

pip install --user pipenv

If you get a warning like

WARNING: The scripts pipenv and pipenv-resolver are installed in '/home/${REPLACE_UBUNTU_USERNAME_HERE}/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Modify PATH system variable to use pipenv

nano ~/.zshrc

Add the next line at the end of the file

export PATH="$PATH:/home/${REPLACE_UBUNTU_USERNAME_HERE}/.local/bin"

Create .env file with environment variable (to create virtual environment inside the project folder)

PIPENV_VENV_IN_PROJECT=1

Finally, install dependencies using pipenv

pipenv install --dev

Select virtual environment in VS Code

  1. Open Command Prompt: Ctrl + Shift + P

  2. Write Python: Select Interpreter

  3. Select your virtual environment

Should be something like ./.venv/bin/python

Test project with pytest

pytest

Install pre-commit hooks in your repository to use pytest

pre-commit install

Install commit linter hook to follow conventional commits guide like here

commit-linter install

Pylint

  1. Open Command Prompt: Ctrl + Shift + P

  2. Write Python: Select Linter

  3. Select pylint

Working with pipenv

  • To activate this project's virtual environment, run pipenv shell.
  • Alternatively, run a command inside the virtual environment with pipenv run.

Template setup

  1. Set GH_TOKEN secret using a personal access token to use semantic release
  2. Set PYPI_TOKEN secret using an auth token from PyPI to upload your project

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

web_utils_software-0.4.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

web_utils_software-0.4.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file web_utils_software-0.4.1.tar.gz.

File metadata

  • Download URL: web_utils_software-0.4.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.15 tqdm/4.65.0 importlib-metadata/6.2.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.11

File hashes

Hashes for web_utils_software-0.4.1.tar.gz
Algorithm Hash digest
SHA256 48d8dd526baa59132865de06b17a818e5be1fa3ce2583a67cc18cf19b0a9543f
MD5 ab1fb8faf0fba90ca330327b14f11bab
BLAKE2b-256 88a38160a2ab558aba80c45f3eb6d4ba58a3e925dae6eab464ee31d16d34a5e0

See more details on using hashes here.

File details

Details for the file web_utils_software-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: web_utils_software-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.15 tqdm/4.65.0 importlib-metadata/6.2.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.11

File hashes

Hashes for web_utils_software-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62ce9689d3736d5d5e0a68b8c121f24845d78aed99684f6014e3b6804fe06c0c
MD5 79126ad2cda104c257f1533d605ceeac
BLAKE2b-256 6cccc6da6f0da7ed08184480fc5cec94f62ab998cef99db63735ae4e6739773d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page