A template for a python package.
Project description
___ _____ _ _
/ _ \ _ _/__ \ ___ _ __ ___ _ __ | | __ _ | |_ ___ ___
/ /_)/| | | | / /\// _ \| '_ ` _ \ | '_ \ | | / _` || __|/ _ \/ __|
/ ___/ | |_| |/ / | __/| | | | | || |_) || || (_| || |_| __/\__ \
\/ \__, |\/ \___||_| |_| |_|| .__/ |_| \__,_| \__|\___||___/
|___/ |_|
Description
A basic python package template which includes proper package structure with a functioning package installation. The package is built using poetry; metadata and dependency information is stored in the pyproject.toml. This template includes flake8, pylint, isort, and pytest settings with configurations compatible with the black autoformatter. Pylint settings are based on the Google style standards for python and adapted for black compatibility. Testing is automated using github workflows, codecov.io, and pre-commit.ci. Application deployment is managed using multi-staged docker builds for fast develop/deploy cycles.
Setup
Using poetry:
git clone https://github.com/crabtr26/pytemplates.git
cd pytemplates
poetry install --no-dev
Usage
From a .py file:
import pytemplates
pytemplates.__version__
pytemplates.greet(user="Jacob")
from pytemplates import wish_farewell
wish_farewell(user="Jacob")
Development Setup
Using poetry:
git clone https://github.com/crabtr26/pytemplates.git
cd pytemplates
poetry install
Testing
To run the tests locally using the development environment:
cd pytemplates
poetry run pytest
Documentation
To build and view the documentation locally using the development environment:
cd pytemplates/docs
make html
google-chrome build/html/index.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytemplates_pypackage-0.0.2.tar.gz.
File metadata
- Download URL: pytemplates_pypackage-0.0.2.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d3c1bb81f7cd6e7a4535a56436bfaae02dff391f00bfed94b9caf5d1e80b965
|
|
| MD5 |
641bf43780dac0d81303380eb27b4cde
|
|
| BLAKE2b-256 |
b0ec7803e4a97ce870a4986b73477928c0afc985b84e1aabcfd4db9008fd1c51
|
File details
Details for the file pytemplates_pypackage-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pytemplates_pypackage-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f199a54971f2fb52e0c67ba1919df38bf696f17a6a4cb130c8ff36efe26fb227
|
|
| MD5 |
f3cd3d0bb7feca47b8b8940ca29a2a10
|
|
| BLAKE2b-256 |
cc1014aab1eec393b5c58446e46a67b5357c890db89d0446b2f8ff78f748e378
|