Skip to main content

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.

Release files for puan-pv-sdk-python 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for puan-pv-sdk-python 0.1.5
File Size Uploaded
puan_pv_sdk_python-0.1.5.tar.gz 2.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for puan-pv-sdk-python 0.1.5
File Interpreter ABI Platform
puan_pv_sdk_python-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 4.8 kB

Release files / puan_pv_sdk_python-0.1.5.tar.gz

Download URL puan_pv_sdk_python-0.1.5.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
74a855d95b95249ced129654c76f052c8e58a75d27285e4b92cd963ca7b1b6c3
BLAKE2b-256 checksum
How to use checksums
78e13ed3dd65c2ca4dc391832c6c37557ba7a8c721baf70245b5c4acfe6553fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.11.5 Darwin/23.0.0

Release files / puan_pv_sdk_python-0.1.5-py3-none-any.whl

Download URL puan_pv_sdk_python-0.1.5-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d58f67d9a69b60bcc180f02f6665f46635a9914318923ddd69cf75a7bc71a093
BLAKE2b-256 checksum
How to use checksums
b7451fff2cfff2407e9284378577dc80fa0010047cba4b74880d5ea88bb3420b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.11.5 Darwin/23.0.0

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page