Skip to content

This contains a template for structuring python package.

License

Notifications You must be signed in to change notification settings

prashantrahul141/Python-Package-Structure

Repository files navigation

Python Package Structure

This contains a template for structuring python packages. Learn more.

Tests

This covers:

  • Structuring python packages
  • Using sub modules to separate code
  • Importing submodules
  • Importing resources like images
  • Testing (pytest, mypy)
  • Linting (flake8)
  • Github actions with tox

Some useful commands:

Building package

# first make sure build is installed and updated
pip install --upgrade build

# then run the build command
python -m build

Install user dependencies

pip install -r requirements.txt

Install dev dependencies

pip install -r requirements_dev.txt

Install the package locally in editable mode

pip install -e .

run pytest to run your tests

pytest

run flake8 to test linting

flake8

get a cool test:status badge on your readme :D

![Tests](https://github.com/<OWNER>/<REPOSITORY>/actions/workflows/<WORKFLOW_FILE>/badge.svg)

Releases

No releases published

Packages

No packages published

Languages