No project description provided
Project description
Puan PV SDK Python
An SDK for connecting to a Puan PV backend.
Example
from puan_pv_sdk_python import PropKey, And, Or, Variable, evaluation_composer
evaluate = evaluation_composer("http://localhost:8080")
keys = evaluate(
propositions=[
And(
variables=[
Or(
variables=[
Variable(id='a'),
Variable(id='b')
]
),
Variable(id='c')
]
),
And(
variables=[
Variable(id='a'),
Variable(id='b')
]
),
],
interpretations=[
{"a": 1, "b": 1, "c": 1},
{"a": 1, "b": 1, "c": 0},
{"a": 1, "b": 0, "c": 1},
],
).data
# >>> print(keys)
# [(0, 0), (0, 2), (1, 0), (1, 1)]
# Meaning,
# - 1st proposition and 1st interpretation returns true,
# - 1st proposition and 3rd interpretation returns true,
# - ...
# and so on.
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
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 puan_pv_sdk_python-0.1.5.tar.gz.
File metadata
- Download URL: puan_pv_sdk_python-0.1.5.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.11.5 Darwin/23.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74a855d95b95249ced129654c76f052c8e58a75d27285e4b92cd963ca7b1b6c3
|
|
| MD5 |
1c2f5585713968e6c0ceed2101296767
|
|
| BLAKE2b-256 |
78e13ed3dd65c2ca4dc391832c6c37557ba7a8c721baf70245b5c4acfe6553fb
|
File details
Details for the file puan_pv_sdk_python-0.1.5-py3-none-any.whl.
File metadata
- Download URL: puan_pv_sdk_python-0.1.5-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.11.5 Darwin/23.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d58f67d9a69b60bcc180f02f6665f46635a9914318923ddd69cf75a7bc71a093
|
|
| MD5 |
7d622d77426ffc054c04c4414f7c8958
|
|
| BLAKE2b-256 |
b7451fff2cfff2407e9284378577dc80fa0010047cba4b74880d5ea88bb3420b
|