Hack and wrap Python function with decorators.
Project description
hackwrap
A powerful decorator-based module to "hack" Python functions and classes — inject, modify, or protect behavior dynamically.
Features
- 🔄 Convert functions between sync and async (
@asnc,@snc) - 🧠 Inspect and extract function metadata with
this - 🔒 Protect functions (
@private,@undeletable,@uncallable) - 🌍 Promote functions to global scope (
@globe) - ⚙ Inherit variables, modules, or class attributes (
@varinherit,@moduleinherit,@classinherit) - 🧵 Make functions threaded (
@threadify) or endless (@endless) - ⚠ Handle exceptions and warnings gracefully (
@handle) - 🧩 Expose double underscored functions (
@public) - 🎭 Treat functions like variables (
@variable,@paramvariable) - 🧬 Dynamic wrapper inheritance (
@inherit) - 🧰 Utility tools and decorators with full introspection and reflection
Installation
pip install hackwrap
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hackwrap-0.1.0.tar.gz
(5.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hackwrap-0.1.0.tar.gz.
File metadata
- Download URL: hackwrap-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a0a3c9e1a737f547542c3876e5d6bef3e56ff5d69934cb457cdbec67b79d398
|
|
| MD5 |
f59ebd5a25d9d57b68fb0debb58e9591
|
|
| BLAKE2b-256 |
91e55e51c7e0b6ea651bfb22e078887d2c1a0b4d3132c37d39883864b52987c0
|
File details
Details for the file hackwrap-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hackwrap-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ec9526ee608b2c13abdd76d41095a75e2c37c25f49b31a43eb0a30e437c9984
|
|
| MD5 |
d58816ac53ed9701dd1fa81875dd8ee4
|
|
| BLAKE2b-256 |
e8ae82a544ff69465be6769e746f34bdcac1bde3047ef7d5a2baa9d5a54b6a1d
|