Skip to main content

A template for a python package.

Project description

   ___        _____                         _         _
  / _ \ _   _/__   \ ___  _ __ ___   _ __  | |  __ _ | |_  ___  ___
 / /_)/| | | | / /\// _ \| '_ ` _ \ | '_ \ | | / _` || __|/ _ \/ __|
/ ___/ | |_| |/ /  |  __/| | | | | || |_) || || (_| || |_|  __/\__ \
\/      \__, |\/    \___||_| |_| |_|| .__/ |_| \__,_| \__|\___||___/
        |___/                       |_|

test workflow documentation workflow release workflow codecov pre-commit.ci status PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytemplates_pypackage-0.0.5.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytemplates_pypackage-0.0.5-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file pytemplates_pypackage-0.0.5.tar.gz.

File metadata

  • Download URL: pytemplates_pypackage-0.0.5.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

Hashes for pytemplates_pypackage-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2935756350c89f1ae7b5dfe877db2be16c946ab3de8c671b0228ef1e81785114
MD5 4ee00d34c102ba50420d58707e0054ee
BLAKE2b-256 eab2fdf05fb7d81561a6ef199fa5709029308fb9c3acbd16f7905dd8ce401dbd

See more details on using hashes here.

File details

Details for the file pytemplates_pypackage-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for pytemplates_pypackage-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2cab84a57fadb44de360582b7e00de2088eca7b0e4df3ba17c5783f09d4d3878
MD5 1d51da42ba81cb84648ff801e284cfe8
BLAKE2b-256 9b697dcf5f94e15f8ef8528e8b045b87b405f1cde79e8ba9d175b8cba9b80acb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page