An open API service indexing awesome lists of open source software.

https://github.com/prashantrahul141/python-package-structure

This contains a template for structuring python package.
https://github.com/prashantrahul141/python-package-structure

github-actions package python python-package python-package-template

Last synced: 3 months ago
JSON representation

This contains a template for structuring python package.

Awesome Lists containing this project

README

          

Python Package Structure

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

![Tests](https://github.com/prashantrahul141/Python-Package-Structure/actions/workflows/tests.yaml/badge.svg)

## 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

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

# then run the build command
python -m build
```

Install user dependencies

```sh
pip install -r requirements.txt
```

Install dev dependencies

```sh
pip install -r requirements_dev.txt
```

Install the package locally in editable mode

```sh
pip install -e .
```

run pytest to run your tests

```sh
pytest
```

run flake8 to test linting

```sh
flake8
```

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

```
![Tests](https://github.com///actions/workflows//badge.svg)
```