Skip to main content

PCMI Python SDK — async HTTP client for the Persistent Cognitive Memory Infrastructure API

Project description

PCMI Python SDK

Async HTTP client for PCMI. For high-throughput store/retrieve, use gRPC or REST directly.

Requirements

  • Python 3.10+

Install

The pcmi package is published to PyPI on each GitHub Release. Until the first publish:

pip install -e .                                    # from this directory
pip install "git+https://github.com/marco-spagn/pcmi.git#subdirectory=sdk/python"

After publish:

pip install pcmi

Quick start

export PCMI_BASE_URL=http://localhost:8000 PCMI_API_KEY=testkey123
python smoke.py
import asyncio
from pcmi import PCMIClient

async def main() -> None:
    async with PCMIClient("http://localhost:8000", "your-api-key") as client:
        await client.store("user.note", "hello", tags=["demo"])
        result = await client.retrieve("user.note", tags=["demo"])
        print(result)

asyncio.run(main())

Documentation

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

pcmi-1.51.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

pcmi-1.51.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file pcmi-1.51.0.tar.gz.

File metadata

  • Download URL: pcmi-1.51.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pcmi-1.51.0.tar.gz
Algorithm Hash digest
SHA256 c573f615488cc14302d75204daf834f9f5a9b9dd723fc4e50fd392355bd598aa
MD5 33233be25737e423148b719ad73fbf50
BLAKE2b-256 3dcd0cda876f02a5d74587550cb624088c4553360740e482da6bf9d95e31a9da

See more details on using hashes here.

File details

Details for the file pcmi-1.51.0-py3-none-any.whl.

File metadata

  • Download URL: pcmi-1.51.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pcmi-1.51.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4da7feff35dbde4d6b837ff820951402b5be43ff312240609fe9ca7d0fef1a40
MD5 9a9d9e6720b81076978728af8d13ab2c
BLAKE2b-256 1c424533996ed6af52d62ecc5dd6f716d5ccb4cff39bdeb13581fb41232d6eb8

See more details on using hashes here.

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