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

Uploaded Source

Built Distribution

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

clicommon-0.2.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for clicommon-0.2.0.tar.gz
Algorithm Hash digest
SHA256 08af202acb9305ccd971a4386fe25e639145e7f69c21615ce820c1b43b82753b
MD5 bd41ffe8d41d376ac13fe30353123b56
BLAKE2b-256 a30055870c9a11991fe1fbdcf6a6d92fceab96b1d34b7e375c17c04d1de143de

See more details on using hashes here.

File details

Details for the file clicommon-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: clicommon-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for clicommon-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 357eff683fff7cb59194cdafc275f6d9874acd5d6979a0d02aad6e790f02f56e
MD5 66debb1d254fb3a87daf3a9e18abb619
BLAKE2b-256 02bebea274aa1225a83ad59a97e7fbc1a514d310b396128525fda1b0d6da47e8

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