myfuncs
myfuncs is a Python package that provides a set of utility functions designed to streamline your code and enhance efficiency across various projects and platforms.
Installation
You can install myfuncs using pip:
pip install myfuncs
Functions Overview
-
nlprint: Enhanced print function. -
is_jwt: Checks if a given string or bytes is a valid JWT (JSON Web Token). -
ranstr: Generates a random string of specified length and character set. -
runcmd: Executes a shell command and optionally returns its output. -
get_terminal_width: Retrieves the terminal width, defaulting to 80 if undetectable. -
print_middle: Displays a string centered amidst a specified character. -
print_columns: Prints list items in columns based on terminal width. -
objinfo: Presents detailed information about an object, its attributes, methods, and documentation. -
default_repr: Provides a standardized string representation of an object. -
typed_evar: Fetches an environment variable with inferred or specified type.
For more detailed descriptions and usage examples, please refer to the module's source code.
Running Tests
The myfuncs package includes a test suite to verify the operation of its functions. To run the tests:
python -m unittest tests/test_myfuncs.py
The other tests file exists for legacy purposes for legacy code in funcs.py (no longer used but kept for backwards compatibility).
Contributing
Contributions to myfuncs are welcomed. If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Metadata
Release files for myfuncs 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| myfuncs-1.6.0.tar.gz | 10.9 kB | Without provenance | Details for myfuncs-1.6.0.tar.gz |
Release files / myfuncs-1.6.0.tar.gz
| Download URL | myfuncs-1.6.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fd7697e214608d261b0d258065ff0db6149c5c2049166f6d938e6f9ebe93826
|
|
BLAKE2b-256 checksum How to use checksums |
e00a49f4eb33fa252aae695d9e63d83e604663193609af1b115ad53a60242ff7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for myfuncs 1.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.