Skip to content

netops2devops/cookiecutter-skeletor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is a slightly opinionated yet simple cookiecutter template that generates boilerplate for a barebones python project which is ready to be used with the following:

  • pytest for unit testing
  • bandit for security linting
  • Black for code formatting
  • autopep8 for pep8 formatting
  • Poetry for package management
  • typer for building CLI apps

Requirements

Usage

To setup a new python project with this cookiecutter

cookiecutter https://github.com/netops2devops/cookiecutter-skeletor.git

This generates a project structure as shown below. A git repository is automatically initialized upon project creation. As per best practices .env is created to store environment vars but is already put under .gitignore

❯ tree -a mypkg
mypkg
├── .gitignore
├── .env
├── .gitlab-ci.yml
├── .pre-commit-config.yaml
├── Dockerfile
├── Makefile
├── README.md
├── config.yaml
├── docker-compose.yml
├── docs
│   ├── development.md
│   ├── install.md
│   └── intro.md
├── poetry.lock
├── pyproject.toml
├── src
│   └── mypkg
│       ├── __init__.py
│       └── logger.py
└── tests
    └── test_utils.py

Finally, install the dependeneices in pyproject.toml under the new project root dir by running

poetry install 

Lastly, export the environment variables

export $(cat .env | grep -v "#" | xargs)

To do

  • Add Hashicorp Vault integration

Author

Kapil Agrawal