Skip to main content

gwp-py

Python client for the GQL Wire Protocol (GWP).

Install

uv add gwp-py

Quick Start

import asyncio
from gwp_py import GqlConnection


async def main():
    conn = await GqlConnection.connect("localhost:50051")
    async with await conn.create_session() as session:
        cursor = await session.execute("MATCH (n:Person) RETURN n.name")
        async for row in cursor:
            print(row)


asyncio.run(main())

Catalog

session.catalog() returns a CatalogClient that names the session on every request; a server that keeps a catalog per session then uses that session's catalog:

async def main():
    conn = await GqlConnection.connect("localhost:50051")
    async with await conn.create_session() as session:
        catalog = session.catalog()
        for schema in await catalog.list_schemas():
            print(schema.name, schema.graph_count)
        graphs = await catalog.list_graphs("default")
    await conn.close()


asyncio.run(main())

A named session that is unknown or closed gets NOT_FOUND. conn.create_catalog_client() gives a client that names no session. catalog.session_id is the session a client names, or None for none.

This client does not send credentials in the handshake yet, so it cannot open a session on a server with authentication (such a server refuses the handshake, and catalog requests without a session, with UNAUTHENTICATED). Use the Rust client against such a server for now.

Features

  • Async-first API built on grpcio.aio
  • Full GQL type support (nodes, edges, paths, temporals, lists, maps)
  • Transaction support with auto-rollback context managers
  • GQLSTATUS error handling
  • Typed write counters: await cursor.counters() returns a Counters with nodes_created, edges_created, properties_set and so on, plus contains_updates(); the raw map stays on summary.counters

License

MIT OR Apache-2.0

Metadata

Release files for gwp-py 0.4.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 gwp-py 0.4.0
File Size Uploaded Provenance Actions
gwp_py-0.4.0.tar.gz 35.4 kB With provenance Details for gwp_py-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gwp-py 0.4.0
File Interpreter ABI Platform Actions
gwp_py-0.4.0-py3-none-any.whl Python 3 none any Details for gwp_py-0.4.0-py3-none-any.whl

Total release size: 71.9 kB

Release files / gwp_py-0.4.0.tar.gz

Download URL gwp_py-0.4.0.tar.gz
Size 35.4 kB
Tags Source
SHA-256 checksum
How to use checksums
29d9b0b630f4e879e1f606c2c1dbad40c1af5e9478b8bfd32f77a2ffb5aad336
BLAKE2b-256 checksum
How to use checksums
bdf4ad12a6f42b2e95d565962d80e4cc0c5689717649d0a6ecf9941f27e462fd
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 7, 2026.

Transparency log

Release files / gwp_py-0.4.0-py3-none-any.whl

Download URL gwp_py-0.4.0-py3-none-any.whl
Size 36.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6327589d6e380fe6f11b09a5e43f319f6c8d8131de9f296776a81c573f765367
BLAKE2b-256 checksum
How to use checksums
edb0ba4d2024755396a76dbb696c962168c2d3410c99d1d3cb13c8badc078489
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 7, 2026.

Transparency log

Security for gwp-py 0.4.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gwp_py-0.4.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 7, 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