Skip to main content

Runtime reflection (lite)

Project description

Test Coverage Stable Version Pre-release Version PyPI - Python Version PyPI Downloads

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

runtime_reflection_lite-0.1.2.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

runtime_reflection_lite-0.1.2-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file runtime_reflection_lite-0.1.2.tar.gz.

File metadata

  • Download URL: runtime_reflection_lite-0.1.2.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for runtime_reflection_lite-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e45f288d8945d138cb0c5d0e8b19cd15369a5d77eb8d8bc094f6905926bbc2ed
MD5 6ef4f8ca3314b2428c75f520ad895c03
BLAKE2b-256 0f390c2f27cdb283deebaef7b640553c51aa559c933701acb61e14d446caa082

See more details on using hashes here.

Provenance

The following attestation bundles were made for runtime_reflection_lite-0.1.2.tar.gz:

Publisher: python-publish.yml on apmadsen/runtime-reflection-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file runtime_reflection_lite-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for runtime_reflection_lite-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b58c2940b3e0770585ae774ebde80fafb61d076cf41c0b6e57992ab9c9bbc43a
MD5 291659cf9bade3a4a25f38cc4ba20d32
BLAKE2b-256 c2db7ff46933092e3924073d67b06b77c64da4310a99902d9a1c2a37e3b33c59

See more details on using hashes here.

Provenance

The following attestation bundles were made for runtime_reflection_lite-0.1.2-py3-none-any.whl:

Publisher: python-publish.yml on apmadsen/runtime-reflection-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page