Azure Function State Storage
A simple key-value storage implementation using Azure Blob Storage as backend.
Features
- Key-value storage with string values
- Automatic container creation
- Time marker functionality
- Thread-safe operations
Installation
pip install az-func-state
Usage
from azfuncstate import AzFuncState
# Initialize with your connection string
conn_str = "YOUR_CONNECTION_STRING"
state = AzFuncState(connection_string=conn_str, container_name="mystate")
# Basic key-value operations
state.set("user:123", "active")
status = state.get("user:123") # Returns "active"
# Time marker operations
state.set_time_marker("last_updated")
last_update = state.get_time_marker("last_updated")
API Reference
AzFuncState(connection_string: str, container_name: str)
Initialize the state storage.
connection_string: Azure Storage account connection stringcontainer_name: Name of the container to use
Methods
set(key: str, value: str) -> None
Store a key-value pair.
get(key: str) -> Optional[str]
Retrieve a value by key. Returns None if key doesn't exist.
set_time_marker(key: str) -> None
Store current UTC timestamp under the given key.
get_time_marker(key: str) -> datetime
Retrieve a stored timestamp. Raises ValueError if key doesn't exist.
Requirements
- Python 3.12+
- azure-storage-blob package
Metadata
Release files for az-func-state 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| az_func_state-0.1.1.tar.gz | 15.3 kB | Without provenance | Details for az_func_state-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| az_func_state-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for az_func_state-0.1.1-py3-none-any.whl |
Total release size: 30.9 kB
Release files / az_func_state-0.1.1.tar.gz
| Download URL | az_func_state-0.1.1.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38a2788dc9e90f9a361df8468415114e3d6a355c8ad1cf6c5a68ad8275722c4c
|
|
BLAKE2b-256 checksum How to use checksums |
4a7100b851687ab3eb79e47d011f0880c2490c9bc0f3563439ecfe6b0866f35a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Release files / az_func_state-0.1.1-py3-none-any.whl
| Download URL | az_func_state-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3597cc75d3ed0fbaf932ea06e7c5f687f664206edc9ed24966b2373cb37b0f2e
|
|
BLAKE2b-256 checksum How to use checksums |
24f5b929b4173fc766a60ca11689ba8de745954e61caa67126c9cb6c9da729d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Security for az-func-state 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.