mkpyp
make python projects idiomatically
Generates a new idiomatic Python project for linux/macos:
project structure - .gitignore, LICENSE
format - black, isort
lint - ruff, mypy, black
test - pytest, coverage
other - pre-commit, Makefile, version.py, requirements
Installation
Install with pip3 install mkpyp. Run with mkpyp.
Developer Installation
After cloning this repo or initializing a new git repository with git init, complete the following steps in root directory.
# create a new virtual environment (e. g. venv)
python3 -m venv .venv
# activate the virtual environment
source .venv/bin/activate
# install pip-compile for auto-generating requirement files
pip install pip-tools hatch
# generate requirement files
make refresh-requirements
# install the requirements and install 'mkpyp' as editable package
make install
# autorun pre commit, needs .git directoy | manually run with pre-commit
pre-commit install
Dependency Management
The location of where dependencies are declared depends on their scope.
- Package dependencies must be put into
pyproject.toml [project] .dependencies. - Opt-in dependencies must be put into
pyproject.toml [project] .optional-dependencies. - Testing dependencies must be put into
requirements/testing.in. - Linting dependencies must be put into
requirements/linting.in.
We generate the requirements files with make refresh-requirements. Reinstall with make install.
Publish
Build the project with hatch build. Now run hatch publish --repo test to upload the package to test.pypi.org. Use hatch publish --repo main to upload to the production PyPI. Define custom targets as per defined here.
Release files for mkpyp 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mkpyp-0.3.2.tar.gz | 13.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mkpyp-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.0 kB
Release files / mkpyp-0.3.2.tar.gz
| Download URL | mkpyp-0.3.2.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
272fb31819afb01f295dfead505db94019a8318a22b9d1a8d21d321adfa03a9b
|
|
BLAKE2b-256 checksum How to use checksums |
ff56a6dd977b932ef1f8c7578811ae1ec35b02243b4bb22e3c8c13e2692f6fff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.23.3
|
Release files / mkpyp-0.3.2-py3-none-any.whl
| Download URL | mkpyp-0.3.2-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b846b50472bce4039d12d73ce0fedfbfc1d282f279077d0b2595c61adcf144f7
|
|
BLAKE2b-256 checksum How to use checksums |
13b57e87b8c6bbd06c6d45e2cdd820da26bfb079a37b02868f98401bc0cbf77f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.23.3
|