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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c33b52a1a792f5345756e323078398db418ece45e77717f196044886ff3bbdf7
|
|
| MD5 |
d53f73b1d41b5da913b8ff3dfbeade61
|
|
| BLAKE2b-256 |
7a53fd4f6dd0af162b60d20b3779ea7b50d1bb2f839b6b60b48e23e473da2416
|
Provenance
The following attestation bundles were made for worldmonitor_sdk-0.1.0.tar.gz:
Publisher:
publish-python.yml on koala73/worldmonitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
worldmonitor_sdk-0.1.0.tar.gz -
Subject digest:
c33b52a1a792f5345756e323078398db418ece45e77717f196044886ff3bbdf7 - Sigstore transparency entry: 2079787440
- Sigstore integration time:
-
Permalink:
koala73/worldmonitor@3cd3755d803725a1d4a5c77623b85f0d527ad882 -
Branch / Tag:
refs/tags/py-v0.1.0 - Owner: https://github.com/koala73
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@3cd3755d803725a1d4a5c77623b85f0d527ad882 -
Trigger Event:
push
-
Statement type:
File details
Details for the file worldmonitor_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: worldmonitor_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c9a3edd5105dfe9434aca5e35d55b94cb2ce5b17c7508e19c5a90f57f8067cf
|
|
| MD5 |
4262e6b337c2b75cd43bc5efb9490bd0
|
|
| BLAKE2b-256 |
3cc9c3919498935eceb1d5dc3c9d7622adfc773bdae4f560b9999589a948a5b9
|
Provenance
The following attestation bundles were made for worldmonitor_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish-python.yml on koala73/worldmonitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
worldmonitor_sdk-0.1.0-py3-none-any.whl -
Subject digest:
5c9a3edd5105dfe9434aca5e35d55b94cb2ce5b17c7508e19c5a90f57f8067cf - Sigstore transparency entry: 2079787796
- Sigstore integration time:
-
Permalink:
koala73/worldmonitor@3cd3755d803725a1d4a5c77623b85f0d527ad882 -
Branch / Tag:
refs/tags/py-v0.1.0 - Owner: https://github.com/koala73
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@3cd3755d803725a1d4a5c77623b85f0d527ad882 -
Trigger Event:
push
-
Statement type: