Skip to main content

Dynamic thread-local storage with mixed-type indexing

Project description

flowgo

Tests Coverage

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


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)

Uploaded Source

Built Distribution

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

flowgo-1.2.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

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

Hashes for flowgo-1.2.0.tar.gz
Algorithm Hash digest
SHA256 a4dbb2dfc3d5bbd7f848ae6db0ccccfba0dcc50c53974325358022b3cd088b3f
MD5 8424b5217f4be8589d475e5334a3c62d
BLAKE2b-256 9fe12f2ee06f1ea5ebf1fc7696cc59ddbc6d3b2fd996d68b9760d71983c52dc2

See more details on using hashes here.

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

Hashes for flowgo-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c869ea1fd062c379e5f1a06a7162a3d74ff60338a42debe81e6fd2231998092
MD5 b29dcaa201e64cdc32870a180a04d267
BLAKE2b-256 c700696d7a489d1941c8fac3352c160f82fbfb28bc136ee2177b4a954d2f2447

See more details on using hashes here.

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