Dynamic variables in Python
Project description
allowdynamic
Dynamic, callable-backed array-like access with optional caching.
🔧 Installation
pip install allowdynamic
🚀 Example
from allowdynamic import DynamicContainer
def fibonacci(n):
if n <= 0: return 0
elif n == 1: return 1
a, b = 0, 1
for _ in range(2, n + 1):
a, b = b, a + b
return b
fib = DynamicContainer(fibonacci)
print(fib[10]) # → 55
print(fib[5:10]) # → [5, 8, 13, 21, 34]
print(10 in fib) # True, if already cached
📦 Features
- Array-like access to any function (
container[i]) - Optional result caching (
cacheMode) - Slice support (
container[1:5]) - Manual cache control (
isCached,updateCache,removeFromCache, etc.)
📄 License
MIT License
(c) 2025 DiamondGotCat
Project details
Release history Release notifications | RSS feed
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 allowdynamic-2.0.1.tar.gz.
File metadata
- Download URL: allowdynamic-2.0.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99f4b3f0bd7fc04fd3c0946364c1fc99a45494ecd7c0ab23319dbe855e187a84
|
|
| MD5 |
d8e479169d2bb87f5d5cfcfff19cf7b9
|
|
| BLAKE2b-256 |
501ca7579f4e5bccb8e0143685bdd1f5e14071da0c20796df1c62da5446adcad
|
Provenance
The following attestation bundles were made for allowdynamic-2.0.1.tar.gz:
Publisher:
python-publish.yml on DiamondGotCat/allowdynamic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
allowdynamic-2.0.1.tar.gz -
Subject digest:
99f4b3f0bd7fc04fd3c0946364c1fc99a45494ecd7c0ab23319dbe855e187a84 - Sigstore transparency entry: 230542364
- Sigstore integration time:
-
Permalink:
DiamondGotCat/allowdynamic@23e40998183f6ae87764298648a7849d799c39ad -
Branch / Tag:
refs/tags/v2.0.1 - Owner: https://github.com/DiamondGotCat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@23e40998183f6ae87764298648a7849d799c39ad -
Trigger Event:
release
-
Statement type:
File details
Details for the file allowdynamic-2.0.1-py3-none-any.whl.
File metadata
- Download URL: allowdynamic-2.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a9bd0580f6fa35cfc54ff3377141caee23a0a01a13526ef05358a0bd94bd158
|
|
| MD5 |
6f8e4819faa34b222b81225e58cea3a0
|
|
| BLAKE2b-256 |
29cde436787e0df5246290dda60ad3dddfe00ce3b07d1808a71010768e0e06eb
|
Provenance
The following attestation bundles were made for allowdynamic-2.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on DiamondGotCat/allowdynamic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
allowdynamic-2.0.1-py3-none-any.whl -
Subject digest:
1a9bd0580f6fa35cfc54ff3377141caee23a0a01a13526ef05358a0bd94bd158 - Sigstore transparency entry: 230542366
- Sigstore integration time:
-
Permalink:
DiamondGotCat/allowdynamic@23e40998183f6ae87764298648a7849d799c39ad -
Branch / Tag:
refs/tags/v2.0.1 - Owner: https://github.com/DiamondGotCat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@23e40998183f6ae87764298648a7849d799c39ad -
Trigger Event:
release
-
Statement type: