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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytemplates_pypackage-0.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 39872c3ac94698f0c47b211bf33a09e8c376caeac179c41b8c113b89a8f4e8d4
MD5 7902014cec0337516a2310d3a18b198f
BLAKE2b-256 11bdfee106993c2c82da6fa38d8c916e5d0d3d2c1836022a299a867ee9e08fa0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytemplates_pypackage-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5f07517073eb71fb5aa56f64610fd0d59f8e8b727990ce53319ff1566d1eee5
MD5 bf912f52f805aac1c467c4a5d11fa7aa
BLAKE2b-256 eab0b14fb6b18a843c4b000476fefdf5500278b05829757a2df4a245885c658a

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