Skip to main content

A template for a python package.

Project description

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

License Documentation: Sphinx codecov pre-commit.ci status Code style: black

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.4.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.4-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytemplates_pypackage-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 73e0c375bcd97ef3ea252c4fd234ff67468b7e40fe46a40b539e03c26d7ab224
MD5 6f3ff77e29b1ba00ffc0e15f8e335ad7
BLAKE2b-256 c18726354ca31a18d0a46c3978298723f1895ee9fb8c87ed08592e5a3cb58032

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytemplates_pypackage-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 165c1386409948e7d6bea46b9b2f6beb0b8015db2b6cb34d9811465c2e80508c
MD5 99fedf59fd1ac4c1f8940710948ff248
BLAKE2b-256 0abe2c691e1e89ec9b7f003dd42fd45b7821b06fc967ac9e16089afa71142d8e

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