Git Product home page Git Product logo

poetry-cookiecutter's Introduction

Open in Dev Containers Open in GitHub Codespaces

๐Ÿช Poetry Cookiecutter

A modern Cookiecutter template for scaffolding Python packages and apps.

๐Ÿฟ Demo

See ๐Ÿ‘– Conformal Tights for an example of a Python package that is scaffolded with this template. Contributing to this package can be done with a single click by starting a GitHub Codespace or starting a Dev Container.

๐ŸŽ Features

โœจ Using

Creating a new Python project

To create a new Python project with this template:

  1. Install the latest Cruft and Cookiecutter in your Python environment with:

    pip install --upgrade "cruft>=2.12.0" "cookiecutter>=2.1.1"
  2. Create a new repository for your Python project, then clone it locally.

  3. Run the following command in the parent directory of the cloned repository to apply the Poetry Cookiecutter template:

    cruft create -f https://github.com/radix-ai/poetry-cookiecutter
  4. Optional: if your repository name differs from your project's slugified name (see project_name in the Template parameters below), you will need to copy the scaffolded project into the repository with:

    cp -r {project-name}/ {repository-name}/

Updating your Python project

To update your Python project with the latest template:

  1. Run cruft update to update your project with the latest template.
  2. If any of the updates failed, resolve them by inspecting the generated .rej files.

๐Ÿค“ Template parameters

Parameter Description
project_type
["package", "app"]
Whether the project is a publishable Python package or a deployable Python app.
project_name
"Spline Reticulator"
The name of the project. Will be slugified to snake_case for importing and kebab-case for installing. For example, My Package will be my_package for importing and my-package for installing.
project_description
"A Python package that reticulates splines."
A single-line description of the project.
project_url
"https://github.com/user/spline-reticulator"
The URL to the project's repository.
author_name
"John Smith"
The full name of the primary author of the project.
author_email
"[email protected]"
The email address of the primary author of the project.
python_version
"3.10"
The minimum Python version that the project requires.
development_environment
["simple", "strict"]
Whether to configure the development environment with a focus on simplicity or with a focus on strictness. In strict mode, additional Ruff rules are added, and tools such as Mypy and Pytest are set to strict mode.
with_conventional_commits
["0", "1"]
If "1", Commitizen will verify that your commits follow the Conventional Commits standard. In return, cz bump may be used to automate Semantic Versioning and Keep A Changelog.
with_fastapi_api
["0", "1"]
If "1", FastAPI is added as a run time dependency, FastAPI API stubs and tests are added, a poe api command for serving the API is added.
with_typer_cli
["0", "1"]
If "1", Typer is added as a run time dependency, Typer CLI stubs and tests are added, the package itself is registered as a CLI.
continuous_integration
["GitHub", "GitLab"]
Whether to include a GitHub Actions or a GitLab CI/CD continuous integration workflow for testing the project, and publishing the package or deploying the app.
private_package_repository_name
"Private Package Repository"
Optional name of a private package repository to install packages from and publish this package to.
private_package_repository_url
"https://pypi.example.com/simple"
Optional URL of a private package repository to install packages from and publish this package to. Make sure to include the /simple suffix. For instance, when using a GitLab Package Registry this value should be of the form https://gitlab.com/api/v4/projects/ {project_id} /packages/pypi/simple.

poetry-cookiecutter's People

Contributors

jwuzyk avatar lsorber avatar mattdl-radix avatar pgerardi avatar rubenpants avatar sinopeus avatar tanguynaets avatar

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.