Skip to main content

verysafe

very-safe is a library that has a function to execute functions very safely! yeah thats it

Installation

Requirements

python >= 3.7

pip install very-safe

Functions

very_safe.very_safe(func, *args)

Main function. Handles a function, if it fails, tries to give an error message with 5 different methods before passing.

very_safe.safe_print(error_message)

Tries to print error_message with 5 different methods before passing!

  • method 1: print()
  • method 2: true_print() (builtins print stored when importing)
  • method 3: sys.stdout.write() + sys.stdout.flush()
  • method 4: os.write()
  • method 5: save to file (error_log.txt)

very_safe.safe_name(obj)

Tries to get a name from obj. Uses 3 different methods before fallback:

  • method 1: getattr() the name, default to str(obj)
  • method 2: str(obj)
  • method 3: repr(obj)

License

MIT

Metadata

Release files for very-safe 0.1.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 very-safe 0.1.0
File Size Uploaded
very_safe-0.1.0.tar.gz 2.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for very-safe 0.1.0
File Interpreter ABI Platform
very_safe-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.2 kB

Release files / very_safe-0.1.0.tar.gz

Download URL very_safe-0.1.0.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
93d21bb177ef6d2bfa9a312a421e147fe1739e9fc290f0a1c546666f7d8db443
BLAKE2b-256 checksum
How to use checksums
b83404d23666e73fa206f6d5aee084abbff1b28a3e287339988c4d0cd0637b9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.1

Release files / very_safe-0.1.0-py3-none-any.whl

Download URL very_safe-0.1.0-py3-none-any.whl
Size 2.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c32fe528512f19559466e933fc1b5fcf1139cf5be878d1c76a6d1df6bb88591b
BLAKE2b-256 checksum
How to use checksums
a16ca663ee66833c3e618d8785f6dc97dfb2bfba6b9490f08536e5866342519a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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