Dynamic thread-local storage with mixed-type indexing
Project description
flowgo
A module for creating and working with individual threads in local memory...
Installation
pip install flowgo
Features
Thread-local storage simulation
Mixed-type indexing via .index
Methods: get, set, push, pop, clear
Memory capacity inspection
Full test coverage & CI/CD
>>> from flowgo import new
>>> d = new(float, 10)
>>> d.index
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
>>> import random
>>> class neuron:
... def key(self):
... self.f = random.random()
... return self.f
...
>>> g = neuron()
>>> for y in range(10):
... d.index[y] = neuron()
... print(d.index[y])
<__main__.neuron object at 0x...>
...
>>> for y in range(10):
... d.index[y] = g.key()
... print(d.index[y])
0.449...
...
>>> d.push(neuron()) # OK
>>> d.pop(5) # Remove element at 5
>>> d.clear() # Clear all
>>> d._py_capacity() # Show memory capacity
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
flowgo-1.2.0.tar.gz
(4.7 kB
view details)
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 flowgo-1.2.0.tar.gz.
File metadata
- Download URL: flowgo-1.2.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4dbb2dfc3d5bbd7f848ae6db0ccccfba0dcc50c53974325358022b3cd088b3f
|
|
| MD5 |
8424b5217f4be8589d475e5334a3c62d
|
|
| BLAKE2b-256 |
9fe12f2ee06f1ea5ebf1fc7696cc59ddbc6d3b2fd996d68b9760d71983c52dc2
|
File details
Details for the file flowgo-1.2.0-py3-none-any.whl.
File metadata
- Download URL: flowgo-1.2.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c869ea1fd062c379e5f1a06a7162a3d74ff60338a42debe81e6fd2231998092
|
|
| MD5 |
b29dcaa201e64cdc32870a180a04d267
|
|
| BLAKE2b-256 |
c700696d7a489d1941c8fac3352c160f82fbfb28bc136ee2177b4a954d2f2447
|