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

https://github.com/radenkovic/python-template

Low dependency python template with black, flake8, pytest and poetry
https://github.com/radenkovic/python-template

boilerplate jupyter jupyter-notebook poetry python python-template template template-python vscode

Last synced: 6 months ago
JSON representation

Low dependency python template with black, flake8, pytest and poetry

Awesome Lists containing this project

README

          

# Python Template

Simple Python template with pytest, black, and flake8

This is a super simple template for python3.11.
It includes configs for VSCode (test runner config and project config)

## Getting Started

- Install poetry first
- `python3.11 -m venv venv` (to create virtualenv)
- Install `poetry` if needed
- Development: poetry install --with jupyter
- `with --jupyter` only if you need notebooks
- Production: poetry install --only main

## Includes

- Uses `poetry` as package manager
- Tests integrated in VSCode (tests panel)
- Sorts out PYTHONPATHs
- tests
- notebooks
- vscode debugger
- Notebook imports from venv working
- `black` for formatting
- `flake8` for linting

## `requirements.txt` generation

```bash
poetry export --without-hashes --with dev --format=requirements.txt > requirements.txt
```