Skip to main content

samyama — Python SDK for the Samyama Graph Database

Python bindings for Samyama, a property-graph database with a Cypher query engine. The extension module is built from Rust with PyO3 on top of crates/samyama-sdk, so the embedded mode runs the engine in-process — no server, no network.

Install

pip install samyama

Wheels are abi3 and work on CPython 3.8+.

The package also installs samyama_aio (asyncio wrapper), samyama_nb (notebook helpers) and samyama_mcp (an MCP server, entry point samyama-mcp-serve).

Connect

Two modes. Embedded runs the engine inside your process:

from samyama import SamyamaClient

client = SamyamaClient.embedded()

Remote talks to a running Samyama server over HTTP:

from samyama import SamyamaClient

client = SamyamaClient.connect(
    "http://localhost:8080",
    timeout_seconds=30.0,          # whole-request deadline
    connect_timeout_seconds=5.0,   # TCP connect only
    max_retries=2,
    retry_base_delay_ms=100,
)

Both return the same SamyamaClient, with the same query methods. Graph algorithms (page_rank, wcc, scc, bfs, dijkstra, pca, triangle_count) and the vector methods (create_vector_index, add_vector, vector_search) are embedded-only and raise RuntimeError on a remote client.

First query

from samyama import SamyamaClient

client = SamyamaClient.embedded()

client.query('CREATE (:Person {name: "Alice"})-[:KNOWS]->(:Person {name: "Bob"})')

result = client.query_readonly(
    "MATCH (a:Person)-[:KNOWS]->(b:Person) RETURN a.name, b.name"
)

print(result.columns)   # ['a.name', 'b.name']
for row in result.records:
    print(row)          # ['Alice', 'Bob']
print(len(result))      # 1

query is read-write, query_readonly is read-only. Both take an optional graph argument, which defaults to "default"; this build serves a single graph and rejects any other name.

A QueryResult exposes columns, records, nodes, edges, and len().

Other methods on the client: status() (returns a ServerStatus with status, version, nodes, edges), ping(), list_graphs(), delete_graph(graph="default").

asyncio

samyama_aio wraps the same client, running each call on a worker thread so the event loop is not blocked:

import asyncio
from samyama_aio import AsyncSamyamaClient

async def main():
    client = await AsyncSamyamaClient.embedded()
    await client.query('CREATE (:Person {name: "Alice"})')
    result = await client.query_readonly("MATCH (n:Person) RETURN n.name")
    print(result.records)   # [['Alice']]

asyncio.run(main())

AsyncSamyamaClient.connect(url, **kwargs) takes the same keyword arguments as SamyamaClient.connect.

More

Apache-2.0.

Metadata

Release files for samyama 1.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for samyama 1.12.0
File Size Uploaded Provenance Actions
samyama-1.12.0.tar.gz 6.6 MB With provenance Details for samyama-1.12.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for samyama 1.12.0
File Actions
samyama-1.12.0-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details for samyama-1.12.0-cp38-abi3-win_amd64.whl
samyama-1.12.0-cp38-abi3-manylinux_2_28_x86_64.whl CPython 3.8 abi3 Linux glibc 2.28+ x86-64 Details for samyama-1.12.0-cp38-abi3-manylinux_2_28_x86_64.whl
samyama-1.12.0-cp38-abi3-manylinux_2_28_aarch64.whl CPython 3.8 abi3 Linux glibc 2.28+ ARM64 Details for samyama-1.12.0-cp38-abi3-manylinux_2_28_aarch64.whl
samyama-1.12.0-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details for samyama-1.12.0-cp38-abi3-macosx_11_0_arm64.whl
samyama-1.12.0-cp38-abi3-macosx_10_15_x86_64.whl CPython 3.8 abi3 macOS 10.15+ x86-64 Details for samyama-1.12.0-cp38-abi3-macosx_10_15_x86_64.whl

Total release size: 61.9 MB

Release files / samyama-1.12.0.tar.gz

Download URL samyama-1.12.0.tar.gz
Size 6.6 MB
Tags Source
SHA-256 checksum
How to use checksums
077fc4028498131b371ec54b191e8a7091e371eea3437bc38268da9b119f567b
BLAKE2b-256 checksum
How to use checksums
752f6311786a8e1ff57756831403453a20fed60b2a2e58b18754302e74bdea72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / samyama-1.12.0-cp38-abi3-win_amd64.whl

Download URL samyama-1.12.0-cp38-abi3-win_amd64.whl
Size 10.1 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
9afbf7ae797f396637f170df4420fbab919f3e6453881a6e8c71313581086572
BLAKE2b-256 checksum
How to use checksums
88cb0cba06bb4d67ad63d8551bb7586cdeff117ca3cf528e718d751d44a4fabb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / samyama-1.12.0-cp38-abi3-manylinux_2_28_x86_64.whl

Download URL samyama-1.12.0-cp38-abi3-manylinux_2_28_x86_64.whl
Size 12.1 MB
Tags CPython 3.8 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
6f6e6f559069e3c7f797b2f728a7fec0caa0d304e371208d5bc88d41b6511475
BLAKE2b-256 checksum
How to use checksums
3e755a10e5aae9414c3b30c7b6dcc80b15848a915e72dec4941709456d974b9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / samyama-1.12.0-cp38-abi3-manylinux_2_28_aarch64.whl

Download URL samyama-1.12.0-cp38-abi3-manylinux_2_28_aarch64.whl
Size 12.0 MB
Tags CPython 3.8 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
a7c2e91f314da170ec0158d06db7a9b28775ad094b37c3ff3ed19a892d29d414
BLAKE2b-256 checksum
How to use checksums
e3204afb67a9a2ac325d6608edc56d0d384440132f93f9a0b77bb23a0689ea5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / samyama-1.12.0-cp38-abi3-macosx_11_0_arm64.whl

Download URL samyama-1.12.0-cp38-abi3-macosx_11_0_arm64.whl
Size 10.2 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
81da413dc92a849890f81bef03e169bc3a476e1339b74ce571b301508c908272
BLAKE2b-256 checksum
How to use checksums
985aa1e1120ccf7e824699b8de8324361c75ed21d81a6fcbb1870f9a52a80777
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / samyama-1.12.0-cp38-abi3-macosx_10_15_x86_64.whl

Download URL samyama-1.12.0-cp38-abi3-macosx_10_15_x86_64.whl
Size 10.9 MB
Tags CPython 3.8 abi3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
9b588d32e1f67df19779c615a52fd32cd943c26e78b6a92841ceb17ab098bb18
BLAKE2b-256 checksum
How to use checksums
d8171c9d25fa1563fe55fbbe2e638b78620719c88128e3d2d509a977af8565fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for samyama 1.12.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for samyama-1.12.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page