This release is a pre-release and may not be stable for production use.
python-runtime-entity-wrappers
A set of small classes to represent Python runtime objects - modules, classes, functions, constants, and abstract instances - in a structured and consistent way. This is especially useful for symbolic interpreters, type systems, or metaprogramming tasks where you need clear semantics of identity and equality for runtime terms.
Classes
| Wrapper | What it Represents | Comparison Semantics |
|---|---|---|
| Module | Python module objects | By module instance |
| Class | Python class/type objects | By class instance |
| Function | Python function or built-in function | By function instance |
| Constant | Immutable primitive values | By value |
| AbstractInstance | Abstract instance of a class (not a real object) | By identity (each AbstractInstance is unique) |
Usage
from python_runtime_entity_wrappers import Module, Class, Function, Constant, AbstractInstance
import math
# Module: refers to the 'math' module object
m1 = Module(math)
m2 = Module(math)
assert m1 == m2
# Class: refers to a Python class
class MyClass: pass
c1 = Class(MyClass)
c2 = Class(MyClass)
assert c1 == c2
# Function: refers to a Python function
def foo(): return 42
f1 = Function(foo)
f2 = Function(foo)
assert f1 == f2
# Constant: refers to a literal/primitive value
k1 = Constant(123)
k2 = Constant(123)
assert k1 == k2
# AbstractInstance: refers to an *abstract* instance of a class (not a real Python object)
i1 = AbstractInstance(MyClass)
i2 = AbstractInstance(MyClass)
assert i1 != i2 # Each AbstractInstance(...) is unique (identity equality)
Contributing
Contributions are welcome! Please submit pull requests or open issues on the GitHub repository.
License
This project is licensed under the MIT License.
Metadata
Release files for python-runtime-entity-wrappers 0.1.0a0
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 |
|---|---|---|---|---|
| python_runtime_entity_wrappers-0.1.0a0.tar.gz | 3.9 kB | Without provenance | Details for python_runtime_entity_wrappers-0.1.0a0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_runtime_entity_wrappers-0.1.0a0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for python_runtime_entity_wrappers-0.1.0a0-py2.py3-none-any.whl |
Total release size: 8.2 kB
Release files / python_runtime_entity_wrappers-0.1.0a0.tar.gz
| Download URL | python_runtime_entity_wrappers-0.1.0a0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4697579673c3210cbdb89191df8f28eab52d839e675472b83642d776e171467c
|
|
BLAKE2b-256 checksum How to use checksums |
7c06a71a4df9b706ef2e324bc1e7887e2773bb2395924e5dd4a40b008b0d4823
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / python_runtime_entity_wrappers-0.1.0a0-py2.py3-none-any.whl
| Download URL | python_runtime_entity_wrappers-0.1.0a0-py2.py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0692b18cd8741c91e3083271ad50ea33c0a09b1a67cb680cbb05df577def104c
|
|
BLAKE2b-256 checksum How to use checksums |
eeff1574eebe59efee0718e69c24cb65404b020ab355166cf79ab368b93ffa65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for python-runtime-entity-wrappers 0.1.0a0
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.