Metadata-Version: 2.4
Name: runtime-reflection-lite
Version: 0.2.0
Summary: Runtime reflection (lite)
Author-email: Anders Madsen <anders.madsen@alphavue.com>
License-Expression: MIT
Project-URL: repository, https://github.com/apmadsen/runtime-reflection-lite
Keywords: windows,linux,async,reflection,inspection
Classifier: Development Status :: 5 - Production/Stable
Classifier: Development Status :: 6 - Mature
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typing-utilities<0.2,>=0.1.0
Provides-Extra: test
Requires-Dist: pytest>=8.3; extra == "test"
Requires-Dist: pytest-cov>=6.1; extra == "test"
Dynamic: license-file

[![Test](https://github.com/apmadsen/runtime-reflection-lite/actions/workflows/python-test.yml/badge.svg)](https://github.com/apmadsen/runtime-reflection-lite/actions/workflows/python-test.yml)
[![Coverage](https://github.com/apmadsen/runtime-reflection-lite/actions/workflows/python-test-coverage.yml/badge.svg)](https://github.com/apmadsen/runtime-reflection-lite/actions/workflows/python-test-coverage.yml)
[![Stable Version](https://img.shields.io/pypi/v/runtime-reflection-lite?label=stable&sort=semver&color=blue)](https://github.com/apmadsen/runtime-reflection-lite/releases)
![Pre-release Version](https://img.shields.io/github/v/release/apmadsen/runtime-reflection-lite?label=pre-release&include_prereleases&sort=semver&color=blue)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/runtime-reflection-lite)
[![PyPI Downloads](https://static.pepy.tech/badge/runtime-reflection-lite/week)](https://pepy.tech/projects/runtime-reflection-lite)

# runtime-reflection-lite

This project is meant as a lightweight implementation of the later reflection project which will support deeper reflection of the source code.

### Example

```python
from runtime.reflection.lite import MemberFilter, get_signature, get_members

class Class1:
     def __init__(self, value: str):
          self.__value = value

     def do_something(self, suffix: str | None = None) -> str:
          return self.__value + (suffix or "")

signature1 = get_signature(Class1.do_something) # -> (suffix: str | None) -> str
signature2 = get_signature(Class1.__init__) # -> (value: str)

members = get_members(Class1, filter = MemberFilter.FUNCTIONS_AND_METHODS)
info, member = members["do_something"] # -> MemberInfo, Method
```

## Full documentation

[Go to documentation](https://github.com/apmadsen/runtime-reflection-lite/blob/main/docs/documentation.md)
