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: AGPL-3.0-or-later.

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.0.tar.gz (20.5 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.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: worldmonitor_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 20.5 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.0.tar.gz
Algorithm Hash digest
SHA256 c33b52a1a792f5345756e323078398db418ece45e77717f196044886ff3bbdf7
MD5 d53f73b1d41b5da913b8ff3dfbeade61
BLAKE2b-256 7a53fd4f6dd0af162b60d20b3779ea7b50d1bb2f839b6b60b48e23e473da2416

See more details on using hashes here.

Provenance

The following attestation bundles were made for worldmonitor_sdk-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for worldmonitor_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c9a3edd5105dfe9434aca5e35d55b94cb2ce5b17c7508e19c5a90f57f8067cf
MD5 4262e6b337c2b75cd43bc5efb9490bd0
BLAKE2b-256 3cc9c3919498935eceb1d5dc3c9d7622adfc773bdae4f560b9999589a948a5b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for worldmonitor_sdk-0.1.0-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