Skip to main content

No project description provided

Project description

Grpc Orchestrator SDK

A gRPC-based implementation of the Saga pattern for distributed transactions.

Features

  • Transaction orchestration
  • Automatic compensation
  • gRPC interface
  • gRPC Connection
  • Memory storage backends

Installation

pip install grpc_orchestrator

Quick Start

from grpc_orchestrator.core.client.client import GrpcOrchestratorClient

client = GrpcOrchestratorClient(orchestrator_host="localhost")
steps = [
    {
        "port": 50052,
        "rpc_method": "CleateOrder",
        "compensation_method": "RollbackOrder",
        "timeout_seconds": 5,
    },
    {
        "port": 50052,
        "rpc_method": "CheckoutOrder",
        "compensation_method": "CheckoutOrder",
        "timeout_seconds": 5,
    },
]
client.start_transaction(transaction_id="1234",steps=steps,payload={
    "id": "1",
    "name":"item1"
})

status = client.get_transaction_status(transaction_id="order_123")
print(status)

Project details


Download files

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

Source Distribution

grpc_orchestrator-0.0.2.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

grpc_orchestrator-0.0.2-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file grpc_orchestrator-0.0.2.tar.gz.

File metadata

  • Download URL: grpc_orchestrator-0.0.2.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for grpc_orchestrator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5013592d322e25e8b418e9059d632c09c5b3b6ce5e03be3d376f4b46431ea4f4
MD5 aa74dd9189aeb6d1fd1dbe4f1828c234
BLAKE2b-256 b25744877a40fe08f749b19e4cd38202b1da771cf8f9cc406e80d2bb2ced684d

See more details on using hashes here.

File details

Details for the file grpc_orchestrator-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for grpc_orchestrator-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 766809819214c75ea15d3089f84d7e697af871fb53ea33f1dce93af0b120985c
MD5 919b0db8ca857ce091ea3c165ca9a0a8
BLAKE2b-256 a3857b23b74c945c1744112ae2bffb585c7a48eaa7d922777e03142c33e78d9f

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