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
You might also like...
PyPC is a very simple tool that creates Python projects from templates.

PyPC (Python Project Creator) PyPC is a very simple tool that creates Python projects from templates. In 0.1v#alpha, custom template creation will be

A python starter package to be used as a template for creating your own python packages.
A python starter package to be used as a template for creating your own python packages.

Python Starter Package This is a basic python starter package to be used as a template for creating your own python packages. Github repo: https://git

Generic template for python service

Cookie cutter template example Technology stack Flask Gevent UWSGI Poetry Docker Docker-compose Installation pip install cookiecutter cookiecutter git

A template for some new Python tool or package with a reasonable basic setup.

python-app-template A template with a reasonable basic setup, including: black (formatting) flake8 (linting) mypy (type checking) isort (import sortin

Generic python project template

generic-python-project-template generic-python-project-template STEPS - STEP 01- Create a repository by using template repository STEP 02- Clone the n

Code Kata Python Template

Code Kata Python Template This is the code kata template for python created by Aula de Software Libre de la Universidad de CΓ³rdoba Step 1. Use this re

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

A Project Template With Python
A Project Template With Python

File Structure . β”œβ”€β”€ LICENSE β”œβ”€β”€ Makefile # commands β”œβ”€β”€ README.md β”œβ”€β”€

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

Owner
E. Tolga Ayan
Data Scientist
E. Tolga Ayan
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
Forkable, Minimal Template for Starknet Projects.

Forkable, Minimal Template for Starknet Projects.

velleity.eth 44 Oct 9, 2022
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

null 18.7k Jan 8, 2023
A cookiecutter template for python scripts

cookiecutter-py-script A cookiecutter template for python scripts Prerequisites Git Usage pip install cookiecutter

Zeheng Li 1 Dec 14, 2022
Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.

Cookiecutter Django Powered by Cookiecutter, Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly. Documentati

Daniel Roy Greenfeld 10k Jan 1, 2023
A low dependency and really simple to start project template for Python Projects.

Python Project Template A low dependency and really simple to start project template for Python Projects. HOW TO USE THIS TEMPLATE DO NOT FORK this is

Yurii Dubinka 5 Jan 21, 2022
Template for creating ds simple projects

ds-project-template Template for creating ds simple projects Requirements pyenv python==3.9.4 Setup For this purpose you use following commands: pytho

null 1 Dec 17, 2021
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
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
Cookiecutter to create a Google Function. Powered by Poetry, GitHub actions, and Google Cloud Platform

Cookiecutter Google Function Cookiecutter template for a Google Function. Powered by Poetry, and GitHub actions. Quickstart Install the latest Cookiec

Arthur 1 Jan 7, 2022