Skip to content
supercarto
Esc
↑↓navigate↵open⌘Jpreview
On this page

Python client

An asyncio client with zero runtime dependencies, speaking JSON-RPC to the Node server over stdio.

npm install pip install supercarto
pnpm add pip install supercarto
yarn add pip install supercarto
bun add pip install supercarto
nub add pip install supercarto
aube add pip install supercarto

The Python package is a client, not a port of the compiler. It speaks JSON-RPC to the Node server over stdio, because the mcp package would pull in httpx and pydantic, and an agent framework that already depends on one of them should not get a second copy.

import asyncio
from supercarto import SuperCarto

async def main():
    async with SuperCarto() as carto:
        m = await carto.maplet(lat=35.6833, lon=139.762, radius_m=400, budget=1500)
        print(m.yaml)
        w = await carto.weather(lat=35.6833, lon=139.762)

asyncio.run(main())
  • maplet (accepts radius_m snake_case) compiles a topological graph, exactly the YAML the Node API returns — the byte-parity gate verifies the port agrees.
  • weather returns the same structured answer, degraded the same way (raises when the source is down, never zeroes).
  • The client requires the Node server (npx supercarto mcp or a global install) on PATH.

Last updated on

Was this page helpful?