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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for raystack_proton-2026.4.15.54516-py3-none-any.whl
Algorithm Hash digest
SHA256 56ba841502f774edd853a55a634e544d41affbd5340b5b1ef5a7158bb8d4ea2c
MD5 2d1f80d33c79ca2b8b45cd9d6b8f73c0
BLAKE2b-256 9cdade2a75cad210c79906a0012f9ce85f59c8ae6585c91d21a769f84fa03462

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