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

Built distribution (wheel)

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

Total release size: 81.0 kB

Release files / gwp_py-0.5.0.tar.gz

Download URL gwp_py-0.5.0.tar.gz
Size 39.7 kB
Tags Source
SHA-256 checksum
How to use checksums
900d68c7881c4d7c394e35a36a3f78175df18dfe39d9a54b45e2ee2ed420ae71
BLAKE2b-256 checksum
How to use checksums
924b94b237a24dc5707c074d832249c15806c0ef2599c050ede487ae74a2797d
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 15, 2026.

Transparency log

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

Download URL gwp_py-0.5.0-py3-none-any.whl
Size 41.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd44a44c9e6aa11fbe2f937b8c2dcc91fcd4e926b12a3e483b1b7565fea90f14
BLAKE2b-256 checksum
How to use checksums
6c038197f5c491b301dbab86fa4f1182c9cbb2271a9c3c3986df7a1b055d42a6
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 15, 2026.

Transparency log

Security for gwp-py 0.5.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.5.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 15, 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