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.3.25.75353-py3-none-any.whl (364.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for raystack_proton-2026.3.25.75353-py3-none-any.whl
Algorithm Hash digest
SHA256 8fd756ac58851a344d36140b6c4cc1b7d5f4196143da722cedac4890ef5b0cec
MD5 4f280d29870da3a5806eb7da7e96b8c2
BLAKE2b-256 89a52af20aee74a1f541082e9df21cde9cb82e153fb316b3bcc459ecb71a4f57

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