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.3.tar.gz (7.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: clicommon-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 8a511fdffa5b5c633350e953a2155ca6eb9174ec8934dd500d41338f91c16770
MD5 45dfaefb16483e3a8f808f47690f32dc
BLAKE2b-256 228eb05e965ea7fbc8f98b3a204d9c7645a84db243c8fcba768e849f2d9a3a3c

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