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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for raystack_proton-2026.3.17.102646-py3-none-any.whl
Algorithm Hash digest
SHA256 7a3ee1f3503eb93a99fc4cc27e41c1d0cfff61c7ee1b09e8374554f67c7b6477
MD5 1df13c1132a268792e4e56989ae2364b
BLAKE2b-256 d2da03fc2c10dddd4c0dbf45771f5c71277aabb56a330f5d36e79e3af84124ab

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