Skip to content

spfunctions/simplefunctions-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleFunctions Python Client

Preview Python client for the SimpleFunctions HTTP/Data API.

The PyPI distribution name is simplefunctions-ai. The import package remains simplefunctions.

pip install simplefunctions-ai
from simplefunctions import world, index, edges, market

state = world()
print(state["index"]["uncertainty"])

idx = index()
print(f"Uncertainty: {idx['uncertainty']}/100")

for edge in edges().get("edges", [])[:3]:
    print(edge.get("title"), edge.get("executableEdge"))

detail = market("KXRECESSION-26DEC31", depth=True)
print(detail)

What this package is

  • A lightweight Python client over public SimpleFunctions endpoints.
  • A notebook and research-pipeline entry point for prediction-market world state.
  • A small set of console scripts for quick reads.

What this package is not

  • It is not the canonical SimpleFunctions SDK yet.
  • It is not the execution runtime.
  • It is not the primary product surface.

The primary local surface is the sf CLI from npm:

npm i -g @spfunctions/cli
sf describe --all --json
sf world --json

Use the HTTP/Data API when you need a network-native surface from Python. Use MCP only when your host specifically requires MCP.

Client Class

from simplefunctions import PredictionMarketClient

client = PredictionMarketClient(api_key="sf_live_...")
state = client.world(format="json")

Console Scripts

sf-world
sf-index
sf-edges
sf-market KXFED
sf-delta 1h

Public read endpoints require no venue trading credentials. Authenticated execution and portfolio workflows belong in the CLI/API surfaces with explicit permission gates.

Links

License

MIT - SimpleFunctions

About

Preview Python client for the SimpleFunctions HTTP/Data API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages