Skip to main content

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

  1. nlprint: Enhanced print function.

  2. is_jwt: Checks if a given string or bytes is a valid JWT (JSON Web Token).

  3. ranstr: Generates a random string of specified length and character set.

  4. runcmd: Executes a shell command and optionally returns its output.

  5. get_terminal_width: Retrieves the terminal width, defaulting to 80 if undetectable.

  6. print_middle: Displays a string centered amidst a specified character.

  7. print_columns: Prints list items in columns based on terminal width.

  8. objinfo: Presents detailed information about an object, its attributes, methods, and documentation.

  9. default_repr: Provides a standardized string representation of an object.

  10. 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)

Source distribution for myfuncs 1.6.0
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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page