Skip to main content

python helper functions

Project description

djp_py_helpers

This package exposes some basic helper functions for configuring the built-in python logging package.

Github

Table of Contents

Dependencies

  • Poetry - Great tool for managing dependencies

Building

Publishing

Installation

Poetry

Refer to installation docs for Poetry.

Navigate to your project you want to use this library in:
cd <path/to/project>

Create a Python virtual environment to work in with this command:
python -m venv ./venv

On Mac & Linux: Run source ./venv/bin/activate

On Windows Run ./venv/scripts/activate.ps1

Download the library from Github with this command: pip install git+https://github.com/Djpleasant/djp-py-logger.git#egg=djp_py_helpers

In your requirements.txt file, adding this line will install the djp_py_helpers package after running pip install -r requirements.txt: djp_py_helpers @ git+https://github.com/Djpleasant/djp-py-logger.git

Usage

Basic setup

""" example script to use the most basic helper function """

import logging
from djp_py_helpers.helpers import configure_logger

# This will not do anything
logging.info('hello world')

# The logging library has been configured now
configure_logger()

# This will output `hello world` in our default logging format
logging.info('hello world')

Project Structure

TDB

Testing

For unit testing: poetry run pytest

For coverage testing: poetry run pytest --cov-report term-missing --cov=./ tests

For coverage testing with report in html: poetry run pytest --cov-report term-missing --cov-report html --cov=./ tests

Contributing

TBD

License

Helper functions for the built-in python logging package.

Copyright (C) 2023 Dawson Pleasant dawsonpleasant@outlook.com (https://https://github.com/Djpleasant)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

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

djp_py_helpers-1.0.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

djp_py_helpers-1.0.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file djp_py_helpers-1.0.0.tar.gz.

File metadata

  • Download URL: djp_py_helpers-1.0.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.3 Windows/10

File hashes

Hashes for djp_py_helpers-1.0.0.tar.gz
Algorithm Hash digest
SHA256 315b05fbc509dcf7c66e6061c03b885834cdf0a4f631a39ab7eee307b6322dc9
MD5 42a31f9f21ce520b04e4b48ff106cf62
BLAKE2b-256 abfcb97bb884b838c4db8513b279f64469bcff6285d4f119875082d491715db6

See more details on using hashes here.

File details

Details for the file djp_py_helpers-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: djp_py_helpers-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.3 Windows/10

File hashes

Hashes for djp_py_helpers-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df38c887ab8e35f363187ab2fd614321c411d1b2e4cd170b4693d3322f49118e
MD5 af4bf0d0e0bd4a92cde0b726b4c88986
BLAKE2b-256 350d4bb3fdc926d22a7fd0cd08b0352a00f29ca4debe858d2f56333d3aedabb0

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