microstate
Simple REST state storage tied to a write key
Creating a state writer
from microstate import MicroStateWriter
from microprediction import new_key
write_key = new_key(difficulty=11) # Takes a while!
msw = MicroStateWriter(write_key=write_key)
Usage pattern 1
Assume we have data taking the form of a dictionary
data = {'age':17,'model':'my model','params':{'mean':17,'std':10}
Store data:
msw.set(value=data)
Retrieve data:
data = msw.get()
Usage pattern 2 (using a logical memory location from 0 to 99)
Store data with a location index
msw.set(value=data, k=34)
Retrieve data with a location index
data = msw.get(k=34)
Other data types
In addition to dict, data may be str, int or float. However it will be stored internally as a binary string. Be aware of this when retrieving the data.
Release files for microstate 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| microstate-0.0.5.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| microstate-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.1 kB
Release files / microstate-0.0.5.tar.gz
| Download URL | microstate-0.0.5.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3961c447717524ca09863135dc974f6f1730d0021a9b730f50de7bd7fc16edb4
|
|
BLAKE2b-256 checksum How to use checksums |
0d18a2d56fa6507ca5f000ddbbc0698a90f72deed791047f84a7206803906632
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|
Release files / microstate-0.0.5-py3-none-any.whl
| Download URL | microstate-0.0.5-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33c9d79e1feffa6086901a4812730134823c8afa64b3a0e27d7efd76ce3c62e7
|
|
BLAKE2b-256 checksum How to use checksums |
744ae34e651a00ec805e2e0c6fdfbcf70591ce8d4376063eafa4e8ea9a5062d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|