Skip to main content

Python client library for Raystack services

Project description

Raystack Proton Python

Python client library for Raystack services, generated from Protocol Buffer definitions.

PyPI: https://pypi.org/project/raystack-proton/

Installation

pip install raystack-proton

This will automatically install the required dependencies:

  • connect-python>=0.5.0 - Connect RPC client
  • googleapis-common-protos>=1.50.0 - Common Google API types
  • grpcio>=1.50.0 - gRPC runtime
  • protobuf>=4.21.0,<7.0.0 - Protocol Buffer runtime

Usage

This library uses Connect RPC for communication with Raystack services.

Synchronous Client

from raystack.frontier.v1beta1 import admin_connect, admin_pb2

# Create client
admin_client = admin_connect.AdminServiceClientSync("http://localhost:8082")

# Make request with authentication headers
request = admin_pb2.CheckFederatedResourcePermissionRequest(
    subject="user:<user-id>",
    resource="app/organization:<org-id>",
    permission="get"
)

response = admin_client.check_federated_resource_permission(
    request,
    headers={"Authorization": "<auth-token>"}
)
print(f"Has permission: {response.status}")

Async Client

import asyncio
from raystack.frontier.v1beta1 import admin_connect, admin_pb2

async def check_permission():
    admin_client = admin_connect.AdminServiceClient("http://localhost:8082")

    request = admin_pb2.CheckFederatedResourcePermissionRequest(
        subject="user:<user-id>",
        resource="app/organization:<org-id>",
        permission="get"
    )

    response = await admin_client.check_federated_resource_permission(
        request,
        headers={"Authorization": "<auth-token>"}
    )
    print(f"Has permission: {response.status}")

# Run the async function
asyncio.run(check_permission())

Development

Building

make build

Or using Python:

python3 build.py build

License

Apache-2.0

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

raystack_proton-2026.5.12.74444-py3-none-any.whl (285.4 kB view details)

Uploaded Python 3

File details

Details for the file raystack_proton-2026.5.12.74444-py3-none-any.whl.

File metadata

File hashes

Hashes for raystack_proton-2026.5.12.74444-py3-none-any.whl
Algorithm Hash digest
SHA256 9e599c990d1fc05e53e913339c66341004bd995a5dfa8fbcdc96f56bff9c8a0a
MD5 e0d3908b8db5fe714cb5a6ef7021d9d1
BLAKE2b-256 13cb49627bc1d29fe0313f14b2093297ca37e28acdcfe29cb4e2b4c71afaca2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page