Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacebrowning/template-python
My template for new Python libraries.
https://github.com/jacebrowning/template-python
cookiecutter hacktoberfest makefile poetry project-creation python template
Last synced: 24 days ago
JSON representation
My template for new Python libraries.
- Host: GitHub
- URL: https://github.com/jacebrowning/template-python
- Owner: jacebrowning
- License: unlicense
- Created: 2013-10-18T21:51:51.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2024-07-20T19:52:33.000Z (4 months ago)
- Last Synced: 2024-08-01T15:15:02.505Z (3 months ago)
- Topics: cookiecutter, hacktoberfest, makefile, poetry, project-creation, python, template
- Language: Python
- Homepage:
- Size: 744 KB
- Stars: 647
- Watchers: 21
- Forks: 100
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-pyproject - Jace's Python Template - A template for new Python libraries. (Project Templates)
README
# Jace's Python Template
This is a [cookiecutter](https://github.com/audreyr/cookiecutter) template for a typical Python library following modern packaging conventions. It utilizes popular libraries alongside Make and Graphviz to fully automate all development and deployment tasks. Check out the live demo: [jacebrowning/template-python-demo](https://github.com/jacebrowning/template-python-demo)
[![Build Status](https://img.shields.io/travis/com/jacebrowning/template-python.svg)](https://app.travis-ci.com/github/jacebrowning/template-python)
## Features
* Preconfigured setup for CI, coverage, and analysis services
* `pyproject.toml` for managing dependencies and package metadata
* `Makefile` for automating common [development tasks](https://github.com/jacebrowning/template-python/blob/main/%7B%7Bcookiecutter.project_name%7D%7D/CONTRIBUTING.md):
- Installing dependencies with `poetry`
- Automatic formatting with `isort` and `black`
- Static analysis with `pylint`
- Type checking with `mypy`
- Docstring styling with `pydocstyle`
- Running tests with `pytest`
- Building documentation with `mkdocs`
- Publishing to PyPI using `poetry`
* Tooling to launch an IPython session with automatic reloading enabledIf you are instead looking for a [Python application](https://caremad.io/posts/2013/07/setup-vs-requirement/) template, check out one of the sibling projects:
* [jacebrowning/template-django](https://github.com/jacebrowning/template-django)
* [jacebrowning/template-flask](https://github.com/jacebrowning/template-flask)## Examples
Here are a few sample projects based on this template:
* [jacebrowning/minilog](https://github.com/jacebrowning/minilog)
* [theovoss/Chess](https://github.com/theovoss/Chess)
* [sprout42/StarStruct](https://github.com/sprout42/StarStruct)
* [MichiganLabs/flask-gcm](https://github.com/MichiganLabs/flask-gcm)
* [flask-restful/flask-restful](https://github.com/flask-restful/flask-restful)## Usage
Install `cookiecutter` and generate a project:
```
$ pip install cookiecutter
$ cookiecutter gh:jacebrowning/template-python -f
```Cookiecutter will ask you for some basic info (your name, project name, python package name, etc.) and generate a base Python project for you.
Once created, run the code formatter to updates files based on your chosen names:```
$ cd
$ make format
```Finally, commit all files generated by this template.
## Updates
Run the update tool, which is generated inside each project:
```
$ bin/update
```