Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python Shared Library

Project description

PYLIB3

  • The pylib3 is a shared python library, that includes common functions that can be used in any python package.
  • This package can be used both with python2 and python3

Usage:

  • Install the pylib3 package (inside your project virtual environment)
pip install pylib3
  • To import the pylib3 package
import pylib3
  • To use one of the common functions from the pylib3 package
from pylib3 import timer

Common Functions:

get_version(caller, version_file)

Gets the version number from the version_file

param str caller: source file caller (i.e file) param str version_file: a version file to get the version number from returns (str): version number or '0.0.0' if the version_file doesn't exists

init_logging(log_file, verbose=False, console=False)

Logger initialization

param str log_file: log file name param bool console: if set to True will print logs both to a file and to stdout (console) param bool verbose: if set to True will print more information

timer(func)

This function used as a decorator function to print the elapsed time of the passed function

param obj func: original function returns (obj): wrapper function

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pylib3, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size pylib3-0.0.3.tar.gz (7.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page