OOP approach for python reflection
Project description
PyReflect
This library is a simple reflection library for Python. It is designed to be simple and easy to use.
Installation
pip install pyreflect
Usage
from pyreflect import reflect
def foo():
return 1
foo_meta = reflect(foo)
print(foo_meta.name) # foo
foo_meta.args.add("a", reflect(int))
foo_meta.update_origin()
try:
foo()
except TypeError as e:
print(e) # foo() missing 1 required positional argument: 'a'
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
pyreflect-0.1.0.tar.gz
(10.0 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
pyreflect-0.1.0-py3-none-any.whl
(17.7 kB
view details)
File details
Details for the file pyreflect-0.1.0.tar.gz.
File metadata
- Download URL: pyreflect-0.1.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8d8816506b5a0c9e5a63ea7d453e9bb5598d00ad3fb5e7d61355eb3a0845351
|
|
| MD5 |
a62698d68a0b4f8ff752cc31ff2cdc45
|
|
| BLAKE2b-256 |
883c284ae3ff4cb27dd1c3e1ab54990434320246a36fd2261a3fd30f5da5badf
|
File details
Details for the file pyreflect-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyreflect-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
308b5f8a0dd70e6fe09d022082abd161e79a84c172e92f985fab83a03ca6786b
|
|
| MD5 |
1c2e4a55f5f728a01594eaee00f9b253
|
|
| BLAKE2b-256 |
e9b6bae59230361bbd14e304c81dc6dd0bae59f964635df8bf845f59a202b9c7
|