privex.helpers.common¶
Common functions and classes that don’t fit into a specific category
Copyright:
+===================================================+
| © 2019 Privex Inc. |
| https://www.privex.io |
+===================================================+
| |
| Originally Developed by Privex Inc. |
| License: X11 / MIT |
| |
| Core Developer(s): |
| |
| (+) Chris (@someguy123) [Privex] |
| (+) Kale (@kryogenic) [Privex] |
| |
+===================================================+
Copyright 2019 Privex Inc. ( https://www.privex.io )
Attributes
Functions
|
Compare two or more numbers, returning |
|
Convert a piece of data into bytes if it isn’t already. |
|
A small wrapper around |
|
Convert |
|
Split iterable into |
|
Removes keys from the passed dict |
|
Round a Decimal to x decimal places using |
|
Quickly check if a variable is empty or not. |
|
Syntactic sugar for |
|
Obtains an environment variable |
|
Obtains an environment variable |
|
Quick n’ dirty parsing of simple CSV formatted environment variables, with fallback to user specified |
|
Alias for |
|
Alias for |
|
Parses an environment variable containing |
|
Extract prefixed settings from a given module, dictionary, class, or instance. |
|
Extract the keys |
|
Extracts a function/method’s signature (or class constructor signature if a class is passed), and returns it as a dictionary. |
|
This function converts a class/function name into a Title Case name. |
|
Inject a list |
|
NOTE: If you’re only loading a small amount of lines, e.g. less than 1MB, consider using the much easier |
|
Warning: Unless you specifically need to verify a value is Falsey, it’s usually safer to check for truth |
|
Check if a given bool/str/int value is some form of |
|
Quick n’ dirty parsing of a simple comma separated line, with automatic whitespace stripping of both the |
|
Parses a csv with key:value pairs such as. |
|
Generate a random string of arbitrary length using a given character set (string / list / tuple). |
|
Read file as series of blocks from end of file to start. |
|
Takes command line arguments as positional args, and properly quotes each argument to make it safe to pass on the command line. |
|
Convert a piece of data into a string (from bytes) if it isn’t already. |
|
Pure python equivalent of the UNIX |
Classes
|
ErrHelpParser - Use this instead of |