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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytemplates_pypackage-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 f484688aafd6741a3cad173d06c24e4794e34de7ae9d8e33f94b7700231d3ebd
MD5 609d8ef52a7bdefb6b2397b4f0502ef8
BLAKE2b-256 41cf60bd3e93ea600b10f03d2ea8e0c42fde7369d116f1e6357edd360452403e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytemplates_pypackage-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ab6e3cbc6a475020cafcfec2328f3470513ead3b6fcd6ef5dcf83dfdde250a8
MD5 4ac033cd535e4613d9cee8b5b32735e1
BLAKE2b-256 6d9fd5292285aa2e99f5d13eca9ee2d4765cb4b52a8f7905c1b15cddba066792

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