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.2

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.2
File Size Uploaded Provenance Actions
gwp_py-0.4.2.tar.gz 39.7 kB With provenance Details for gwp_py-0.4.2.tar.gz

Built distribution (wheel)

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

Total release size: 81.0 kB

Release files / gwp_py-0.4.2.tar.gz

Download URL gwp_py-0.4.2.tar.gz
Size 39.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a225a03101988074d021b1bc1d4af77755d01266d646e1bfdd83e469ff399b23
BLAKE2b-256 checksum
How to use checksums
dda8563ef64639622b48e32e18df0ec520979e1202c9832b49c406b2bcbb4bc7
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 14, 2026.

Transparency log

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

Download URL gwp_py-0.4.2-py3-none-any.whl
Size 41.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe8e0daf4c9b1979245a4143e5b7a65c8031590e19e1c8b9a77ab44bdfb363b8
BLAKE2b-256 checksum
How to use checksums
5890b8d150cdbc20f9b3837c0f0685e5a1868ee358183d2ad0cf6aae1cf1329e
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 14, 2026.

Transparency log

Security for gwp-py 0.4.2

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.2.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 14, 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