{"library":"sppl","title":"SPPL (Sum-Product Probabilistic Language)","type":"library","description":"SPPL is a probabilistic programming language for specifying and manipulating sum-product expressions. Version 2.0.4 targets Python >=3.8. The library enables concise modeling of discrete and continuous random variables with automatic inference.","language":"python","status":"active","last_verified":"Sat May 09","install":{"commands":["pip install sppl"],"cli":null},"imports":["from sppl.distributions import SPPLDistribution","from sppl import Model","from sppl import Variable"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/probcomp/sppl","docs":null,"changelog":null,"pypi":"https://pypi.org/project/sppl/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"from sppl import Model, Variable\nfrom sppl.distributions import SPPLDistribution\nimport os\n\n# Define a simple model: flip a fair coin\nmodel = Model()\nwith model:\n    x = Variable('x', SPPLDistribution.bernoulli(0.5))\n\n# Check the model structure\nprint(model)\n","lang":"python","description":"Creates a simple probabilistic model with a Bernoulli variable.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}