Skip to main content

Shorthand for logger initialization, recording worst called loglevel and handling nice console output

Project description

ofunctions

Collection of useful python functions

License Percentage of issues still open Maintainability codecov linux-tests windows-tests GitHub Release

ofunctions is a set of various recurrent functions amongst

  • bisection: bisection algorithm for any function with any number of arguments, works LtoR and RtoL
  • checksums: various SHA256 tools for checking and creating checksum files
  • csv: CSV file reader with various enhancements over generic reader
  • delayed_keyboardinterrupt: just a nifty tool to catch CTRL+C signals
  • file_utils: file handling functions of which
    • get_paths_recursive: Walks a path for directories / files, can deal with permission errors, has include / exclude lists with wildcard support...
    • check_path_access: Checks whether a path is writable, with fallback for read test, and splits path until it finds which part denies permissions
    • check_file_timestamp_delta: Check a time delta (seconds, minutes, hours...) against file ctime, mtime or atime
    • hide_file: Hides/unhides files under windows & linux
    • get_writable_temp_dir: Returns a temporary dir in which we are allowed to write
    • get_writable_random_file: Returns a filename of a not-yet existing file we can write into
  • json_sanitize: make sure json does not contain unsupported chars, yes I look at you Windows eventlog
  • logger_utils: basic no brain console + file log creation
  • mailer: send emails regardless of ssl/tls protocols, in batch or as single mail, with attachments
  • network: various tools like ping, internet check, MTU probing and public IP discovery
  • platform: nothing special here, just check what arch we are running on
  • process: simple kill-them-all function to terminate subprocesses
  • random: basic random string & password generator
  • service_control: control Windows / Linux service start / stop / status
  • string_handling: remove accents / special chars from strings
  • threading: threading decorator for functions

It is compatible with Python 3.5+ and is tested on both Linux and Windows.

Setup

pip install ofunctions.<subpackage>

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

ofunctions.logger_utils-2.0.2.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

ofunctions.logger_utils-2.0.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file ofunctions.logger_utils-2.0.2.tar.gz.

File metadata

  • Download URL: ofunctions.logger_utils-2.0.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.26.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.1 CPython/3.8.6

File hashes

Hashes for ofunctions.logger_utils-2.0.2.tar.gz
Algorithm Hash digest
SHA256 f8b8c6572e59993367a58bbffaa2d75f8114c0a441970bfb45040301da271f6b
MD5 10d62ca808a4007ad090c54b7a57014d
BLAKE2b-256 c80cd4e18e4ca79553681c40fbcf3e6b6a5b8a4efeff9ff44e3c248fb13a4d3a

See more details on using hashes here.

Provenance

File details

Details for the file ofunctions.logger_utils-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: ofunctions.logger_utils-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.26.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.1 CPython/3.8.6

File hashes

Hashes for ofunctions.logger_utils-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e152f711b4dc08217bf40e94b4eede90c598bdb69cfd98649492cbfcff7bb2a6
MD5 91717064887a9d560242740eb9c7de96
BLAKE2b-256 6a24fec1d8277edba345a27a27852ed2a0e405d3f6be11c068298643812f1cae

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page