Skip to main content

Official Python SDK for the World Monitor global-intelligence API — country briefs, risk scores, conflict/cyber/market/news feeds, and MCP tools without writing an HTTP integration.

Project description

worldmonitor-sdk

Official Python SDK for the World Monitor global-intelligence API — country briefs, risk scores, conflict / cyber / market / news feeds, and every MCP tool, without writing an HTTP integration.

Stdlib-only (zero dependencies), MCP-first: the same design as the official worldmonitor npm CLI. The MCP server is the live, documented agent surface; a small REST escape hatch rounds it out.

Install

pip install worldmonitor-sdk

Quickstart

from worldmonitor_sdk import Client

client = Client(api_key="wm_...")  # or set WORLDMONITOR_API_KEY

client.list_tools()                          # public — no key needed
client.country_risk("IR")                    # curated helper
client.conflict_events(country="IR", limit=5)
client.call_tool("get_market_data", asset_class="crypto")  # any MCP tool
client.get("/api/health")                    # raw REST GET

Data calls (tools/call) need a user API key — get one at worldmonitor.app/pro. Listing tools, prompts, and resources is public.

Server-side projection

Every tool accepts an optional jmespath argument that projects the response server-side (typically an 80–95% size cut):

client.world_brief(jmespath="hotspots[].name")

See the JMESPath guide for worked examples.

Errors

  • worldmonitor_sdk.MCPError — the MCP server returned a JSON-RPC error (.code, auth failures carry a key hint).
  • worldmonitor_sdk.APIError — a REST/transport failure (.status, .body).

Both derive from worldmonitor_sdk.WorldMonitorError.

Configuration

Constructor arg Environment variable Default
api_key WORLDMONITOR_API_KEY (or WM_API_KEY)
base_url WORLDMONITOR_BASE_URL https://api.worldmonitor.app
mcp_url WORLDMONITOR_MCP_URL https://worldmonitor.app/mcp
timeout 30.0 seconds

The source lives in sdk/python/ in the main repository. Docs: worldmonitor.app/docs/sdks. License: MIT (thin client; the World Monitor platform itself remains AGPL-3.0).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

worldmonitor_sdk-0.1.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

worldmonitor_sdk-0.1.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file worldmonitor_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: worldmonitor_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for worldmonitor_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0be885d991198cbb94276bd0b42358f5551205687bac18c85c2e73c768dcb513
MD5 820fb2cd14ce1e23afc8d12745a3cedb
BLAKE2b-256 e947a4e412ff6717a07cc003cbccf923a730d8738579d3f4fa94025923d0c1ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for worldmonitor_sdk-0.1.1.tar.gz:

Publisher: publish-python.yml on koala73/worldmonitor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file worldmonitor_sdk-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for worldmonitor_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce67f4dea83f39f46ee7c2cb79469e7eab8386a41d7c675a2d96099bd95b0b3a
MD5 eca55ca69ac84a29475be79c86508d9d
BLAKE2b-256 adfeaa75a4fcf3ef73f09c5840d3e4e020d028366730d0fe2d3be65453869353

See more details on using hashes here.

Provenance

The following attestation bundles were made for worldmonitor_sdk-0.1.1-py3-none-any.whl:

Publisher: publish-python.yml on koala73/worldmonitor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page