python-introspect
Extensible analysis of callable signatures, dataclass fields, type hints, and docstrings, plus signature-derived callable declaration projection.
Quick start
from python_introspect import SignatureAnalyzer
def resize(image, factor: float = 0.5, *, preserve_range: bool = True):
"""Resize an image.
Args:
image: Input image.
factor: Scale factor.
preserve_range: Preserve the input intensity range.
"""
parameters = SignatureAnalyzer().analyze(resize)
for name, info in parameters.items():
print(name, info.param_type, info.default_value, info.is_required)
analyze is the unified entry point for functions, methods, classes,
dataclass types, and instances. It returns a mapping of names to
ParameterInfo records.
Use callable_declaration_kwargs when declaration identity should omit
keyword arguments equal to their signature defaults. The caller supplies value
equality so array, lazy, or other framework-specific values keep their owning
semantics.
Extension points
Use register_namespace_provider to contribute names used while resolving
forward references and register_type_resolver to unwrap application proxy
types. Wrappers can declare their user-facing inspection target through the
signature-target helpers in python_introspect.signature_analyzer.
Installation
python -m pip install python-introspect
The runtime depends on metaclass-registry. Repository and issues: OpenHCSDev/python-introspect.
Documentation
The maintained sources are in docs/source. Documentation
changes are checked by the repository's documentation
workflow;
the local warnings-as-errors build command is documented in
development.rst.
Metadata
Release files for python-introspect 0.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_introspect-0.1.16.tar.gz | 46.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_introspect-0.1.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 82.5 kB
Release files / python_introspect-0.1.16.tar.gz
| Download URL | python_introspect-0.1.16.tar.gz |
|---|---|
| Size | 46.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a98c83e01ae819ff20b7d42cea3b0259a7ed982064d1653ac333861428026e4
|
|
BLAKE2b-256 checksum How to use checksums |
c8183ec2bcf490da778a1cd4a4933e0d4f54511b9bfa4e4bdf0f511a19ce6792
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / python_introspect-0.1.16-py3-none-any.whl
| Download URL | python_introspect-0.1.16-py3-none-any.whl |
|---|---|
| Size | 35.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd8a718bca68e4ae8cc8f5f580edf5e12de8f07f322f3f83e330fa80d691bac6
|
|
BLAKE2b-256 checksum How to use checksums |
0ecb39ac678f265c3e9f540bb61549b9e6e7a0fd43153dce1288468fd3e0dfce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|