Supports runtime key-path recording/accessing for Python.
Project description
Python Key-path
Supports runtime key-path recording/accessing for Python.
from __future__ import annotations
from runtime_keypath import KeyPath, KeyPathSupporting
class A(KeyPathSupporting):
def __init__(self) -> None:
self.__b = B()
@property
def b(self) -> B:
return self.__b
class B(KeyPathSupporting):
def __init__(self) -> None:
self.__c = C()
@property
def c(self) -> C:
return self.__c
class C:
pass
a = A()
key_path = KeyPath.of(a.b.c)
assert key_path.target is a and key_path.keys == ("b", "c")
assert key_path() is a.b.c
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
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
File details
Details for the file runtime_keypath-0.1.7.tar.gz.
File metadata
- Download URL: runtime_keypath-0.1.7.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fffb4b6f304df4c22f775151202806134a01aaf3d7f297f71183fb0167b574aa
|
|
| MD5 |
35ac2b6f244656228777c9a08abe837f
|
|
| BLAKE2b-256 |
fb2ab1b4ed4c8bb5f6b40895ebc9eb093374acd8daafcbbfd339651b2fa252ee
|
Provenance
The following attestation bundles were made for runtime_keypath-0.1.7.tar.gz:
Publisher:
python-publish.yml on Azureblade3808/py-runtime-keypath
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
runtime_keypath-0.1.7.tar.gz -
Subject digest:
fffb4b6f304df4c22f775151202806134a01aaf3d7f297f71183fb0167b574aa - Sigstore transparency entry: 549842006
- Sigstore integration time:
-
Permalink:
Azureblade3808/py-runtime-keypath@74ee9f141ed371929320fad9d79346faa3a4d0ae -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/Azureblade3808
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@74ee9f141ed371929320fad9d79346faa3a4d0ae -
Trigger Event:
release
-
Statement type:
File details
Details for the file runtime_keypath-0.1.7-py3-none-any.whl.
File metadata
- Download URL: runtime_keypath-0.1.7-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b83fb4031cfa219da2148375822bd5da278ef8a6d77ce48184ab4d2b8547f5a7
|
|
| MD5 |
f77ceae097ed386f1af20efbdf70fc80
|
|
| BLAKE2b-256 |
e1fb3fa91822ede0d9ebd3284c89a86d5315cd08258126ab0bf55966568076b3
|
Provenance
The following attestation bundles were made for runtime_keypath-0.1.7-py3-none-any.whl:
Publisher:
python-publish.yml on Azureblade3808/py-runtime-keypath
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
runtime_keypath-0.1.7-py3-none-any.whl -
Subject digest:
b83fb4031cfa219da2148375822bd5da278ef8a6d77ce48184ab4d2b8547f5a7 - Sigstore transparency entry: 549842030
- Sigstore integration time:
-
Permalink:
Azureblade3808/py-runtime-keypath@74ee9f141ed371929320fad9d79346faa3a4d0ae -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/Azureblade3808
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@74ee9f141ed371929320fad9d79346faa3a4d0ae -
Trigger Event:
release
-
Statement type: