Skip to main content

Python Common Client Library

Project description

clicommon

Python Common Client Library

Common Functions

bcheck

Checks variabled passwed defined a true or false, not defined is considered false
bcheck(variable) -> bool

mlog

General logging function mlog(msg_type, msg_string = None, exit_code = None, datelog = None, colors = None):

msg_type with corresponding Colors (if colors flat is True) INFO=GREEN SUCCESS=GREEN WARN=YELLOW WARNING=YELLOW FATAL=RED ERROR=RED CRITICAL=RED TEST=GRAY DEBUG=MAGENTA VERBOSE=BRIGHT_CYAN BUILD_DEBUG=BRIGHT_GREEN CODE_DEBUG=BRIGHT_GREEN

msg_string (anything) NOTE: If msg_string is not defined msg_type is considered the msg_string

exit_code if boolean is true after output exit

datelog if boolean is true add ISO8601 datetime to output

colors if boolean is true add ASCII colors to output bsaed on msg_type color codes

rcmd

Small function to run command sub process and return results rcmd (command)

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

clicommon-0.1.1.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file clicommon-0.1.1.tar.gz.

File metadata

  • Download URL: clicommon-0.1.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for clicommon-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f55ef372cdd6822458320cfc6b7b5958ffd53f6d3e44443b51d785d44089258b
MD5 1b47cef9bbfaa933939af4fe307cc3f1
BLAKE2b-256 adf65f58a7ea0cf5f64df812bed899ae64a35e6d2d300e99a83e9a1f5ba84ea4

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