Skip to content

blankdots/minimalpy

Repository files navigation

Minimal Python Project

Integration Tests Python Unit Tests Python style check Documentation Checks Coverage Status Documentation Status

An example of a minimal Python 3.11+ project that contains an web application built with aiohttp. At the same time the project exemplifies:

  • aiohttp server;
  • logging formatting;
  • unit tests;
  • tox automation for:
    • flake8 style enforcement;
    • running unit tests and coverage;
  • github-actions and coveralls integration;
  • bandit to check common security issues in Python code;
  • building documentation for readthedocs.

Install and Run

Installation can be done:

  • Github - without cloning
$ pip install git+https://github.com/blankdots/minimalpy.git
  • cloning repository:
$ git clone git@github.com:blankdots/minimalpy.git
$ cd minimalpy
$ pip install .

After install the application can be started like: $ minimal

Tests and Documentation

In order to run the tests: $ tox in the root directory of the git project.

To build documentation locally:

$ cd docs
$ make html

Structure

Following a similar structure as described in: Structuring Your (Python) Project. Main application resides in minimalpy folder, documentation in docs and unit tests in tests.

.
├── minimalpy
│   ├── __init__.py
│   └── server.py
├── data
│   └── data.json
├── docs
│   ├── conf.py
│   ├── index.rst
│   └── Makefile
├── bandit.yml
├── LICENSE
├── README.md
├── readthedocs.yml
├── requirements.txt
├── setup.py
├── tests
│   ├── conftest.py
│   ├── coveralls.py
│   ├── __init__.py
│   └── test_server.py
└── tox.ini

Build and Deployment

build and run using docker:

docker build -t minimalpy .
docker run -p 5430:5430 minimalpy

License

minimalpy python and all it sources are released under Apache License 2.0.

Similar Projects

Some projects similar in scope: