Value API - Python Connector
A Python client for the Value API Server.
Install
pip install valueapiconnector
Usage
from valueapiconnector import ValueApiConnector, ValueDataType, ABCValue
connector = ValueAPIConnector("https://values.my-server.com/")
# The auth token is optional
context = connector.get_context("test",
auth_token="<my_secret_token>",
)
context.update_auth_token("<my_secret_token>")
x = context.get_value("my_int_list", ValueDataType.INTEGER_LIST)
print(x.pull().unwrap()) # []
x.push([1, 2, 3])
print(x.pull().unwrap()) # [1, 2, 3]
x.delete()
print(x.pull().unwrap()) # []
class TestValues(ABCValue):
def __init__(self, identifier):
super().__init__(context, identifier)
def __str__(self) -> str:
return str(self.__dict__)
test_obj = TestValues(1)
print(test_obj) # {}
test_obj.x = 24
test_obj.y = [4, 5]
print(test_obj) # {x: 24, y=[4,5]}
test_obj = TestValues(1)
print(test_obj) # {x: 24, y=[4,5]}
test_obj = TestValues(2)
print(test_obj) # {}
Metadata
Release files for valueapiconnector 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| valueapiconnector-0.1.0.tar.gz | 6.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| valueapiconnector-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 kB
Release files / valueapiconnector-0.1.0.tar.gz
| Download URL | valueapiconnector-0.1.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93517b885f391a247979c3cae980b3079fb1e837b2caa83a0dff94a7b4cd4fe1
|
|
BLAKE2b-256 checksum How to use checksums |
37fd6341872f179313b2a224ad160170d0b97d45225702be0513d6b4463809e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.11
|
Release files / valueapiconnector-0.1.0-py3-none-any.whl
| Download URL | valueapiconnector-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7eb61d315031899e2ee3de8ee084d2f9623c9a5a40a37ace431c851d7e5dc93c
|
|
BLAKE2b-256 checksum How to use checksums |
3e7d4b959bfc8ab5ddbe56a0c02018bbf3603142f95e4650d1d945eca7cb2af9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.11
|