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.4.tar.gz (10.9 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.4-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: grpc_orchestrator-0.0.4.tar.gz
  • Upload date:
  • Size: 10.9 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.4.tar.gz
Algorithm Hash digest
SHA256 c858fd8d97cfc4ef30ec79574613d65580e0d533bc5c58670697ce0e1de35aca
MD5 0e25cb757a6a01395f848df693bbc750
BLAKE2b-256 eb64b6af199146f31b7fed847db9960878518573b34bff50ff34b72342319a9e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for grpc_orchestrator-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e2c4b0ec9dfe8c47f9e06290bc4a2ad8e51151d9b9d3818e90d9851efda6cb2a
MD5 892258dbac6f1803270125a97f9a5caa
BLAKE2b-256 bae7678f74c1656a4c069ff1bc7069824084e2c4831cffe1f1a37eb26c2d412e

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