Metadata-Version: 2.4
Name: flippy-lang
Version: 0.1.4
Summary: FlipPy probabilistic programming language
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: pdoc==15.0.3; extra == "dev"
Requires-Dist: jupyter==1.1.1; extra == "dev"
Provides-Extra: full
Requires-Dist: joblib==1.4.2; extra == "full"
Requires-Dist: numpy==2.0.2; extra == "full"
Requires-Dist: scipy==1.14.1; extra == "full"
Requires-Dist: sympy~=1.13.3; extra == "full"
Requires-Dist: matplotlib==3.10.3; extra == "full"
Requires-Dist: pandas==2.3.1; extra == "full"
Requires-Dist: seaborn==0.13.2; extra == "full"
Dynamic: license-file

<p align="center">
    <img src="https://raw.githubusercontent.com/codec-lab/flippy/refs/heads/main/flippy-wide.svg" alt="FlipPy Logo" width="65%"/>
</p>

# 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](https://codec-lab.github.io/flippy/flippy.html).

## Quick start

FlipPy can be installed with `pip`:

```bash
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:

```bash
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:

```python
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
```
