This repository is intended to be used with Cookiecutter to quickly set up python projects from various templates. The main reason is efficiency and uniformity among projects, but the hope is that it will be a starting point to share knowledge and best coding practices.
- Python 3.8
- cookiecutter
- poetry
- pytest
- vscode dev-container
If you want to use this scheleton app project you can use cookiecutter to download and use the template.
Look into the Installation section if you want to know how to use and install this project.
Cookiecutter is a project template configurator: allows you to download and configure your project easily and in a very simple way.
- First of all you have to install cookiecutter on your python installation (with pip)
- Then create the templates launching on your terminal:
# if you are using gitlab with https
cookiecutter https://github.com/JeyDi/Python-Skeleton
# if you are using gitlab with ssh
cookiecutter [email protected]:JeyDi/Python-Skeleton.git
And then follow the instruction in the terminal that will appear to create a specific project.
If you want to use this project with cookiecutter make sure to have this tools installed
- python (3.8 or +): better: 3.8.10
- cookiecutter
- poetry (if you want to test the example project after the download)
- docker
- docker-compose
If you don't know how to install this requirements please check this site or google it :)
If you want to develop, maintain, extend or use this repository you have to setup your environment first
- Install a Python 3.8 version (default one, with conda or with pyenv)
- Install cookiecutter with pip: https://cookiecutter.readthedocs.io/
python3 -m pip install --user cookiecutter
- Install Poetry (please follow the official guide: https://python-poetry.org/docs/
# you can use this script to install poetry
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
- move into the folder created and launch the following command to create the virtualenvironment
poetry install
- During the development, it is sufficient to set up the virtual environment with
poetry shell
You can use also pip with the requirements.txt file to install the python libraries and dependencies.
If you want to use pip please consider to create a specific virtualenv
before.
At the moment there are 4 templates already implemented
- Base Python: if you want to build a base python application
- Package: if you want to create and build a python package
- FastAPI: an example of a FastAPI project with some examples
- Streamlit: a template to create a streamlit dashboard application
Next template that we want implement:
- Flask: a template to create a flask application
- GUI: a gui interface simple example
Be careful, for now the FastAPI and Streamlit application are not working due to some modifications required
See the open issues for a list of proposed features (and known issues).
If you see something bad or you want to contribute, please open an issue or a pull request.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
Please feel free to clone and update the code in this repository.
Let me know if something need to be updated or fixed :)
The Data Science templates is based on this repositories: