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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for raystack_proton-2025.11.1.101325-py3-none-any.whl
Algorithm Hash digest
SHA256 d7563bdcac2d08e7dac2deab8e8a026088af55763eea8b631741d3501e33c96d
MD5 dc230fb20d7916306c5c2d5e01393e46
BLAKE2b-256 205d5861aaf9a2fc3d05b7a567b17df76cec90610152e53ab5de95c0c3b231d1

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