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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytemplates_pypackage-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 3f441211d8bfb0b2b1da2e527f18a365ed47f957ec95b340f9538147a6b00374
MD5 e21f1ac88cbe5c4e0450b3e80ecf4515
BLAKE2b-256 b7faf6e526e77da8bfb22ad077d5eb8184c53c52e2f2a1d31b28769e137da685

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytemplates_pypackage-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b199fec49beb27bfb962d7f61ec3a363488f2c5cb99e3a8a841b1b6bb92810c9
MD5 4d0b316c459e84d8a3340e21f6b3a401
BLAKE2b-256 0a580faaa23f170f231fdf751c987f1df0250afeb8b48a36cdac87599984d923

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