Python example making use of best practice file structure and multithreading.

Related tags

Boilerplateanaconda
Overview

MY ANACONDA DON'T

Python example making use of best practice file structure and multithreading.

made for python3+ en Kipsiam

File structure

project/
|
|-- anaconda/
|   |-- runner.py (Main entrypoint)
|   |-- __main__.py 
|   |-- hello/
|   |   |-- hello.py (hello module)
|   |   |-- helpers.py (helper functions for hello module)
|   |
|   |-- world/
|       |-- world.py
|       |-- helpers.py
|
|-- data/  (Data folder could contain input/output files like logs while testing the application)
|   |-- input.txt 
|
|-- docs/  (Bigger/more complicated apps should have documentation for each module)
|   |- hello.md 
|   |- world.md
|
|-- readme.md (You are reading this one)
|-- LICENSE (Yes you should have a LICENSE)
|-- requirements.txt (Pip requirements to install)
|-- Makefile (A makefile could be used to automate tests and setup)
|-- .gitignore (files being ignored by git)

Running

  • Open the root as workspace folder and run python3 -m anaconda or py -m anaconda (depends on your path).
  • Setup and run with make setup to install dependencies and make run to run the script
  • Can't run this with the debug button i think. Learn some commands like ctrl + ~

More

Notes

  • Makefile uses Make. You can install that with choco install make while having Chocolatery installed. Or skip it all together..
  • Opened up threads cant be closed with ctrl+c. If it chrases use your task manager. Should use a global variable for stopping it (like we are doing in this example) or change to classes with a function that raises an exeption
  • the __main__.py in anaconda/ is there so we can run the module with python3 -m anaconda
  • This project doesnt use any pip dependencies, but its there as an example
  • It might be better to thread a whole Class instead of a method (function)

Resources

Author

BahbV [email protected]

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

SUNNY BHAVEEN CHANDRA 3 Oct 03, 2022
Python-boilerplate - Python Boilerplate Project Structure

python-boilerplate Python Boilerplate Project Structure Folder Structure .github

1 Jan 18, 2022
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
A Boilerplate repo for Scientific Python Open Science projects

A Boilerplate repo for Scientific Python Open Science projects Installation Clone this repo If you need a fresh python environment, run $ conda env cr

Vincent Choqueuse 2 Dec 23, 2021
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 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 01, 2023
Python example making use of best practice file structure and multithreading.

Python example making use of best practice file structure and multithreading.

Bob 1 Oct 13, 2021
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 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

Anton Pirogov 3 Jul 19, 2022
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
This is a boilerplate for a basic backend app using Python, Django and SQLite, as developed after tutorials with Programming with Mosh

This is a boilerplate for a basic backend app using Python, Django and SQLite, as developed after tutorials with Programming with Mosh

Gustavo Catala Sverdrup 1 Jan 07, 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

1 Dec 17, 2021
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
NHS Theme for Streamlit applications

NHS Streamlit App Template Deployment (local) The tool has been built using Stre

nhs.pycom 3 Nov 07, 2022
King is a simple boilerplate from a bigger Discord Bot project created for my Discord Server.

King A simple Discord bot boilerplate. King is a simple boilerplate from a bigger Discord Bot project created for my Discord Server. I intend to showc

Xminent 0 Aug 21, 2021
Creating Templates and components so those can be reusable some time and makes workflow a lot easier!

TEMPLATES AND COMPONENTS IN ANY LANG! This is an Open Repository For Students to Contribute code in Hackoctoberfest in different Languages and Tech me

SriSravyaN 9 Feb 19, 2022
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
Forkable, Minimal Template for Starknet Projects.

Forkable, Minimal Template for Starknet Projects.

andreas 44 Oct 09, 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