Skip to main content

a minimal Python project example with unit testing, command line interface, PyPi publishing capabilities

Project description

Minimal Example Project

This repo provides a complete example for a PRO Python project that you and your fellow developers will be proud of.

Source: https://github.com/michel-lacle/minimal_example_project

It provides:

  • a pip installable project.
  • module entry point examples, so you can run your modules from the command line.
  • a pytest based testing framework.
  • example commands for various workflows.
  • scripts to publish project to pypi repo.

Developer Workflows

Initialize the python project

This you only do once after you clone this repo.

# setup your environment to put all python dependencies in the env folder
python3 -m venv env

# set python path to use our isolated python environment
. env/bin/activate

# install the package in editable mode so you can
# develop & test without having to reinstall the package
python3 -m pip install -e ./

Development & Testing

This you do every time open a new shell to develop, run, and test your code.

# set python path to use our isolated python environment
. env/bin/activate

# install project dependencies
python3 -m pip install -r requirements.txt

# add a project dependency
python3 -m pip install <new dependency>

# then you need to save the dependency
python3 -m pip freeze > requirements.txt

# run all tests
python3 -m pytest

# install the package in non editable mode
python3 -m pip install ./

# uninstall the package
python3 -m pip uninstall minimal_example_project

# run the package main
python3 -m merkle_example

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

minimal_example_project-1.0.3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

minimal_example_project-1.0.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file minimal_example_project-1.0.3.tar.gz.

File metadata

  • Download URL: minimal_example_project-1.0.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for minimal_example_project-1.0.3.tar.gz
Algorithm Hash digest
SHA256 d6396ebdc48d0f4f180d4796941562b1c913a6e8385f6847ef58ac243a413bb6
MD5 5b46cfa1168c8aaaa83dcbd75c47cd5e
BLAKE2b-256 a8740482e93a5b46a2802ebb94338281024a15e62947cc376fa9fd71a59abcbc

See more details on using hashes here.

File details

Details for the file minimal_example_project-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: minimal_example_project-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for minimal_example_project-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f1a8ecac19b811ba2a061b224de57b8a7e43c6e891b11cc410b20bafb96a7cfa
MD5 e70dbb93d9387f277064085b1e836704
BLAKE2b-256 ec26b1af45e305d0f6b285e998ef3481515a8e44487cc1d26a9eef1cbbe50df7

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