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
docs/SDK-API-CLI-ARCHITECTURE.md— how the SDKs, the HTTP API and the CLI fit together.sdk/README.md— the other two SDKs (TypeScript, Rust).samyama_mcp/README.md— the MCP server.
Apache-2.0.
Metadata
Release files for samyama 1.14.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| samyama-1.14.0.tar.gz | 6.9 MB | With provenance | Details for samyama-1.14.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| samyama-1.14.0-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details for samyama-1.14.0-cp38-abi3-win_amd64.whl |
| samyama-1.14.0-cp38-abi3-manylinux_2_28_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.28+ x86-64 | Details for samyama-1.14.0-cp38-abi3-manylinux_2_28_x86_64.whl |
| samyama-1.14.0-cp38-abi3-manylinux_2_28_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.28+ ARM64 | Details for samyama-1.14.0-cp38-abi3-manylinux_2_28_aarch64.whl |
| samyama-1.14.0-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details for samyama-1.14.0-cp38-abi3-macosx_11_0_arm64.whl |
| samyama-1.14.0-cp38-abi3-macosx_10_15_x86_64.whl | CPython 3.8 | abi3 | macOS 10.15+ x86-64 | Details for samyama-1.14.0-cp38-abi3-macosx_10_15_x86_64.whl |
Total release size: 60.1 MB
Release files / samyama-1.14.0.tar.gz
| Download URL | samyama-1.14.0.tar.gz |
|---|---|
| Size | 6.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3e8ec056ab497c7573aea48a252b43f4f6e4a332da9f8deefa640951472b8eb
|
|
BLAKE2b-256 checksum How to use checksums |
8d8af51e583c678253bd7e1d3f77393db1a8bf0f4489c4258bf7a873e158a742
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / samyama-1.14.0-cp38-abi3-win_amd64.whl
| Download URL | samyama-1.14.0-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 9.6 MB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e9f48dad5686497d0abbc9de52631461d7ff73e581add2d600de17ae21eaa681
|
|
BLAKE2b-256 checksum How to use checksums |
f67acd210ff9bc5e84d80d18ca6fa17c9fc733fffc2c8c26b0e5482e1e359ee8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / samyama-1.14.0-cp38-abi3-manylinux_2_28_x86_64.whl
| Download URL | samyama-1.14.0-cp38-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 11.8 MB |
| Tags | CPython 3.8 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c5ec88f344f8c4f28d2912ee4bccd162a0261cf8d60aa08ab4b86bb3c84e5964
|
|
BLAKE2b-256 checksum How to use checksums |
cb2594a942141f8f3c3efb4cce46163423909a6fd12ca119dd4f5f0387c9a126
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / samyama-1.14.0-cp38-abi3-manylinux_2_28_aarch64.whl
| Download URL | samyama-1.14.0-cp38-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 11.5 MB |
| Tags | CPython 3.8 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
4da03198e9d9d2ec4f6e87783a5a4ac16ca54fd12fb5b6c5e5620ca298d2f2ff
|
|
BLAKE2b-256 checksum How to use checksums |
08d47040e3a174318847e49602841f61968b3c6d150f23b6eaac2af10c02e4e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / samyama-1.14.0-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | samyama-1.14.0-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.9 MB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
918d1b4bc28d63f63eb51d1e9c0fe361f1cfcf79e7dbf0c60052773b3d90ccc0
|
|
BLAKE2b-256 checksum How to use checksums |
93270489c3202a3f490216303429c968fad7f603321b4085fc0d16f51f764632
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / samyama-1.14.0-cp38-abi3-macosx_10_15_x86_64.whl
| Download URL | samyama-1.14.0-cp38-abi3-macosx_10_15_x86_64.whl |
|---|---|
| Size | 10.5 MB |
| Tags | CPython 3.8 abi3 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
52b3eefa2c33db24651760e6a918123ddc1e27dc19923eef2b85dfeee87aad53
|
|
BLAKE2b-256 checksum How to use checksums |
35b22d5c548f041dad1a3f3d3aa4b324f7a19f3c9f48c49790967f91a14f8a2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logSecurity for samyama 1.14.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.
Attestation for samyama-1.14.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 Nov 3, 2026.
Transparency logA 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.