FlipPy: Pythonic Probabilistic Programming
FlipPy lets you specify probabilistic programs in Python syntax while seamlessly interacting with the rest of Python.
Documentation and tutorials can be found here.
Quick start
FlipPy can be installed with pip:
pip install flippy-lang
The core functionality of FlipPy does not require any dependendencies, so the above command will only install FlipPy. To install the dependencies required for full functionality, use:
pip install flippy-lang[full]
Example: Sum of Bernoullis
FlipPy lets you specify probablistic programs using standard Python syntax. Here is a simple example involving the sum of two Bernoulli random variables:
from flippy import infer, flip
@infer
def fn():
x = flip(0.5)
y = flip(0.5)
return x + y
fn() # Distribution({0: 0.25, 1: 0.5, 2: 0.25})
Tests
To run the tests (this requires installing pytest):
(venv) $ pytest
Metadata
Release files for flippy-lang 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| flippy_lang-0.1.5.tar.gz | 102.2 kB | Without provenance | Details for flippy_lang-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flippy_lang-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for flippy_lang-0.1.5-py3-none-any.whl |
Total release size: 204.3 kB
Release files / flippy_lang-0.1.5.tar.gz
| Download URL | flippy_lang-0.1.5.tar.gz |
|---|---|
| Size | 102.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95b449fde0cd93d1b7d5b0c35c8e005869af7964a407e522a7451d58435c20b7
|
|
BLAKE2b-256 checksum How to use checksums |
c16259d80041636cfc339c9029ed3b5854427a672d82d6e75b1eb1442f0af0d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.12
|
Release files / flippy_lang-0.1.5-py3-none-any.whl
| Download URL | flippy_lang-0.1.5-py3-none-any.whl |
|---|---|
| Size | 102.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e6887854d8b4ce75e7cd7a4e54bc90d542ab58317d3b083fa81e8cb20bd496a
|
|
BLAKE2b-256 checksum How to use checksums |
b8a8847436b872620dcc69e32bf39a2b600edd9498eaeff5304b78d05991811b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.12
|
Security for flippy-lang 0.1.5
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.