Skip to main content

Python SDK for YAMS (Yet Another Memory System) - Build plugins and clients

Project description

yams-sdk

builds.sr.ht status PyPI License: GPL v3

Python SDK for building YAMS plugins.

Installation

pip install yams-sdk

Quick Start

Create a plugin:

from yams_sdk import BasePlugin, rpc

class MyPlugin(BasePlugin):
    def manifest(self):
        return {
            "name": "my_plugin",
            "version": "1.0.0",
            "interfaces": ["content_extractor_v1"]
        }

    @rpc("extractor.extract")
    def extract(self, source: dict) -> dict:
        return {"text": "extracted content", "metadata": {}}

if __name__ == "__main__":
    MyPlugin().run()

Test it:

echo '{"id":1,"method":"handshake.manifest"}' | python my_plugin.py

Use with YAMS

# Trust your plugin
yams plugin trust add /path/to/my_plugin.py

# Load it
yams plugin load my_plugin.py

# Verify
yams plugin list

Documentation

License

GPL-3.0-only

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

yams_sdk-0.0.1.tar.gz (36.9 kB view details)

Uploaded Source

Built Distribution

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

yams_sdk-0.0.1-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file yams_sdk-0.0.1.tar.gz.

File metadata

  • Download URL: yams_sdk-0.0.1.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yams_sdk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 babe84348a43de34eb31226137cc8a8b3a67eb8de7c99afdc3d11a15a4241544
MD5 615509c673189f919dde935110189de1
BLAKE2b-256 db308f65ef5a27cb06873ddf94444779d972dada9d51013497d8957f975f7f2a

See more details on using hashes here.

File details

Details for the file yams_sdk-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: yams_sdk-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yams_sdk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa68347b2f75773ec8ff0350344a934f9f56c12ccf237fcc6e4a382adb4c7366
MD5 faabd30552a6e190eab85bd0225486d3
BLAKE2b-256 406c3676842e0e41629702b73998c98d84871e22903b32370ec0b3e400faab0d

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