Cookiecutter-allpurpose-minimal-python - A simple cookiecutter template for general-purpose python projects.

Overview

cookiecutter-allpurpose-minimal-python

A simple cookiecutter template for general-purpose python projects.

To use, run

pip install cookiecutter
cookiecutter https://github.com/tolgayan/cookiecutter-allpurpose-minimal-python

Managing dependencies

Note: This template uses poetry. But if you want to use another tool for dependency management (pipenv, virtualenv, conda etc.), you can skip this section and use your own tool. You can also delete pyproject.toml file. No part of the template depends on poetry. But it may be easier to manage your environment, and to configure the tools such as black or pylint with poetry.

To start, run poetry install. This command will install all the packages I add to the dependencies as an initial start.

To add a pip package, run poetry add . This command will add the package to pyproject.toml file, and also will install it to the environment.

Configurations for packages such as black, isort, pylint etc. can be set in pyproject.toml file.

How to run

To run a command in the environment, add poetry run at the beginning of that command.

Example:

poetry run python main.py <args>  # to run main.py 
poetry run black                  # to run black 
poetry run pylint src/ 

Logging

A basic logging configuration is added to the project. You can modify it from logger.py module. You can use logger by adding the following code to any python file. The logger will use the settings in the logger.py file.

import logging
logger = logging.getLogger(__name__)

# logging in code
logger.info('info log')
logger.warning('warning log')
logger.error('error log')

The logs will be shown in terminal, and will be saved into artifacts/logs/ .log

Tests

An example test case is added into tests folder. You can run tests using the following code:

poetry run pytest tests/
# or
poetry run pytest
Owner
E. Tolga Ayan
Data Scientist
E. Tolga Ayan
A template repo for use in the Advent of Code

AoC-Template A template repo for use in the Advent of Code The README_template.md must contain "STATS_TABLE" to be replaced by the generated table, an

0 Jan 14, 2022
A Project Template With Python

File Structure . ├── LICENSE ├── Makefile # commands ├── README.md ├──

Annotation AI 61 Jan 02, 2023
Brif is a boilerplate tool based on Docker and FastAPI, designed to streamline the development and deployment of IIIF compliant platforms.

brif A boilerplate tool based on Docker, designed to streamline the development and deployment of IIIF compliant platforms. Embedded with FastAPI, Cel

Pierre 8 Sep 17, 2022
Template repository to build PyTorch projects from source on any version of PyTorch/CUDA/cuDNN.

Template repository to build PyTorch projects from source on any version of PyTorch/CUDA/cuDNN.

Joonhyung Lee/이준형 651 Dec 12, 2022
Django starter project with 🔋

A batteries-included Django starter project. For a production-ready version see the book Django for Professionals. 🚀 Features Django 3.1 & Python 3.8

William Vincent 1.5k Jan 08, 2023
A project to get you started with Docker and Django.

Docker Django tl;dr $ git clone [email protected]:erroneousboat/docker-django.git $ d

JP Bruins Slot 176 Dec 29, 2022
CRUD app to create and save code snippets, Flask/Python restful Api/backend and React/Typescript frontend

MS3 Cheat-Hub A cheatsheet hub. An app that organizes your code snippets into collections of cheat sheets and allows you to view, like and save others

Joem Elias Sanez 21 Dec 28, 2022
Cookiecutter Flask OpenAPI is a template for jumpstarting production-ready Flask projects quickly.

Cookiecutter Flask OpenAPI is a template for jumpstarting production-ready Flask projects quickly. It has a well organized and scalable structure. It uses API design first

Roger Camargo 3 Nov 17, 2022
Boilerplate code for a Python Flask API

MrMat :: Python :: API :: Flask Boilerplate code for a Python Flask API This variant of a Python Flask API is code-first and using native Flask Featur

0 Dec 26, 2021
A boilerplate Django project for quickly getting started.

The Definitive Django Learning Platform. Django Project Boilerplate This repository is a boilerplate Django project for quickly getting started. Getti

Le Huynh Long 1 Nov 01, 2021
Template to quickly start your playwright-python project

Playwright-python template 🍪 Template to quickly start your playwright-python project Getting started • Demo • Configuration Getting started Clone th

Constantin 1 Dec 13, 2021
simple flask starter app utilizing docker

Simple flask starter app utilizing docker to showcase seasonal anime using jikanpy (myanimelist unofficial api).

Kennedy Ngugi Mwaura 5 Dec 15, 2021
The starter for the Flask React project

Flask React Project This is the starter for the Flask React project. Getting started Clone this repository (only this branch) git clone https://github

Parker Bolick 2 May 14, 2022
Backend Boilerplate using Django,celery,Redis

Backend Boilerplate using Django,celery,Redis

Daniel Mawioo 2 Sep 14, 2022
Um template para quem quiser usar o Docker + PGSQL + Django.

Um template para quem quiser usar o Docker + PGSQL + Django.

Drack 2 Mar 11, 2022
This is the starter for the Flask React project.

Flask React Project This is the starter for the Flask React project. Getting started Clone this repository (only this branch) git clone https://github

Jami Travers 5 May 25, 2022
A Django starter template with a sound foundation.

SOS Django Template SOS Django Tempalate is a Django starter template that has opinionated and good solutions while starting your new Django project.

Eray Erdin 19 Oct 30, 2022
A simple cookiecutter to create Python Telegram bots, wrapped with Django.

PTB Django cookiecutter A simple cookiecutter to create Python Telegram bots, wrapped with Django. Based on this cool projects python-telegram-bot (PT

Carlos Lugones 20 Nov 12, 2022
Bleeding edge django template focused on code quality and security.

wemake-django-template Bleeding edge django2.2 template focused on code quality and security. Purpose This project is used to scaffold a django projec

wemake.services 1.6k Jan 04, 2023
A Django project skeleton that is modern and cutting edge.

{% comment "This comment section will be deleted in the generated project" %} Edge A Fantastic Django project starter. Features Ready Bootstrap-themed

Arun Ravindran 827 Dec 15, 2022