Skip to main content

Python client for emem.dev, the agent-native Earth memory protocol

Project description

ememdev: Python client for emem.dev

Thin, typed Python client for the emem.dev Earth memory protocol. Wraps the public REST surface (96 documented paths, 93 under /v1/*) in a single Client class that returns parsed JSON verbatim. Every ed25519-signed receipt and content-addressed CID is preserved for citation and offline verification.

Install

pip install ememdev

The distribution is named ememdev; the import package is emem (so pip install ememdev, then from emem import Client). To work from a checkout instead:

pip install -e sdks/emem-py

Requires Python 3.9+. The only runtime dependency is httpx.

Quick start

from emem import Client

with Client() as em:
    cell = em.locate("Mount Fuji")["cell64"]
    facts = em.recall(cell, bands=["copdem30m.elevation_mean"])
    print(facts["facts"][0]["value"])

Async

import asyncio
from emem import AsyncClient

async def main() -> None:
    async with AsyncClient() as em:
        out = await em.ask("How tall is Mount Everest?")
        print(out["answer"])

asyncio.run(main())

Configuration

Env var Default Effect
EMEM_BASE_URL https://emem.dev Responder root; point at a self-hosted node
EMEM_TIMEOUT_SECS 180 HTTP timeout (matches gateway timeout)

You can also pass base_url= and timeout= directly to the constructor.

Surface coverage

Geocoder + read primitives, physics solvers, boring lat/lng shortcuts, and introspection — see the inline docstring on emem.client for the full endpoint → method mapping.

Receipts

Every non-introspection response carries a receipt block with:

  • responder_pubkey (ed25519 base32-nopad-lowercase)
  • signature_b32 (ed25519 over the canonical CBOR preimage)
  • merkle_root (BLAKE3 over the fact CIDs)
  • fact_cids[] (the BLAKE3 CIDs of every fact returned)

To cite an answer: quote receipt.fact_cids[0] and the responder pubkey. The signature can be verified offline against the public key at https://emem.dev/.well-known/emem.json; no callback to the responder is required.

License

Apache-2.0. Same as the upstream protocol.

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

ememdev-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

ememdev-0.1.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ememdev-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ememdev-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1d19d162ddf551f4701c825bb307db78cc40104167038b9ab7c26fe8957fd2b3
MD5 621ce31469473382b2b07af987e483ba
BLAKE2b-256 52d97b4a4accfe8c02c1d5f1cfde4f0f7d32994d76fa9c04f0fa5cef3e67ffb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ememdev-0.1.0.tar.gz:

Publisher: publish-pypi.yml on Vortx-AI/emem

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

File details

Details for the file ememdev-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ememdev-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ememdev-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a14d365a2df7b2ec0630b72b54eb0312fdcbb7fa8580e852bb80c6d5e96c119
MD5 919ca0b9a6d718485a033b25e049884f
BLAKE2b-256 e4940f59092376af43f9c9daf696a3febf8265f1086378f33c4870bc90b5a86d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ememdev-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on Vortx-AI/emem

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