Giter VIP home page Giter VIP logo

cookiecutter-python's Introduction

Cookiecutter Python Package

A Cookiecutter template for a Python package with Poetry as the dependency manager.

NOTE: Only Python 3.8+ is supported.


Features

  • Hooks: Pre-commit
  • Formatters and Linters: Black, Flake8, Flake8-bugbear, Isort, and Lizard
  • Testing Frameworks (Optional): Pytest, Coverage, and CovDefaults

Usage

  • Since this template uses Poetry as the dependancy manager, install poetry from https://python-poetry.org/docs/#installation

  • Install the cookiecutter library.

    pip install cookiecutter

    OR

    python -m pip install cookiecutter
  • Run the command:

    cookiecutter https://github.com/gurashish1singh/cookiecutter-python.git

    OR

    python -m cookiecutter https://github.com/gurashish1singh/cookiecutter-python.git
  • This template uses post-project generation hooks to:

    • Initialize a git repository (with default branch as main), IF the working directory is not already a git repository.

      NOTE: You will have to create a repositry on remote if it doesn't already exist before running the cookiecutter command.

    • Create a Poetry virtualenv

    • Install all dependencies

    • Install the pre-commit and pre-push hooks

cookiecutter-python's People

Contributors

gurashish1singh avatar

Watchers

 avatar

cookiecutter-python's Issues

Add web frameworks

Similar to how the user is prompted for adding test packages (pytest, coverage, covdefaults), we need to add prompt for web frameworks as well (Flask or FastAPI)

AC:

  • cookiecutter.json is updated to add a prompt for web frameworks
  • Give the user a choice of adding Flask or FastAPI or skipping the installation of web frameworks
  • pyproject.toml inside the project_slug dir is updated to install either Flask (pinned at 2.0.0) or FastAPI (pinned at 0.88.0 ?)

Reference: https://cookiecutter.readthedocs.io/en/2.1.1/advanced/choice_variables.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.