Python Generated gRPC client and server interfaces from Digitalkin's service apis
Project description
digitalkin_proto
Python Generated gRPC client and server interfaces from Digitalkin's service APIs.
Installation
pip install digitalkin_proto
Overview
This package provides Python interfaces generated from Digitalkin's Protocol Buffer definitions, enabling seamless integration with Digitalkin services via gRPC.
Usage
Basic Import
import digitalkin_proto
from digitalkin_proto.digitalkin.module.v1 import module_pb2, module_service_pb2_grpc
Working with gRPC Services
Example for connecting to a gRPC service:
import grpc
from digitalkin_proto.digitalkin.module.v1 import module_service_pb2_grpc
from digitalkin_proto.digitalkin.module.v1 import module_pb2
# Create a gRPC channel and client stub
channel = grpc.insecure_channel('localhost:50051')
stub = module_service_pb2_grpc.ModuleServiceStub(channel)
# Create a request object
request = module_pb2.YourRequestType(
field1="value1",
field2="value2"
)
# Call the service
response = stub.YourServiceMethod(request)
print(response)
Development
Prerequisites
- Python 3.10+
- uv - Modern Python package management
- buf - Protocol buffer toolkit
- protoc - Protocol Buffers compiler
- Task - Task runner
Setup Development Environment
# Clone the repository with submodules
git clone --recurse-submodules https://github.com/DigitalKin-ai/service-apis-py.git
cd service-apis-py
# Setup development environment and activate the venv
task setup-dev
source .venv/bin/activate
Common Development Tasks
# Generate Python code from protobuf definitions
task gen-proto
# Build the package
task build-package
# Run tests
task run-tests
# Format code
task format
# Lint code
task lint
# Clean build artifacts
task clean
# Bump version
task bump-version -- major
task bump-version -- minor
task bump-version -- patch
Publishing Process
- Update code and commit changes
- Use the GitHub "Create Release" workflow to bump version (patch, minor, major)
- The workflow will automatically create a new release and publish to PyPI
License
This project is licensed under the terms specified in the LICENSE file.
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file digitalkin_proto-0.1.8.tar.gz.
File metadata
- Download URL: digitalkin_proto-0.1.8.tar.gz
- Upload date:
- Size: 79.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
844eabdf2f7423a1c3a0b5be133b79169fc76863858170e7b93809f7cca58225
|
|
| MD5 |
86ad1795abf10c6924e4f8381dffc913
|
|
| BLAKE2b-256 |
bc71b4bad930ff573b66c38d9f2075d897dc133325ede88c86ab5627d7343689
|
Provenance
The following attestation bundles were made for digitalkin_proto-0.1.8.tar.gz:
Publisher:
publish.yml on DigitalKin-ai/service-apis-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
digitalkin_proto-0.1.8.tar.gz -
Subject digest:
844eabdf2f7423a1c3a0b5be133b79169fc76863858170e7b93809f7cca58225 - Sigstore transparency entry: 204836101
- Sigstore integration time:
-
Permalink:
DigitalKin-ai/service-apis-py@b01ac94b48eb9c982750328d33c99bfb042a926c -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/DigitalKin-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b01ac94b48eb9c982750328d33c99bfb042a926c -
Trigger Event:
release
-
Statement type:
File details
Details for the file digitalkin_proto-0.1.8-py3-none-any.whl.
File metadata
- Download URL: digitalkin_proto-0.1.8-py3-none-any.whl
- Upload date:
- Size: 145.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b2ea5f235f3fada2a1335e9358ad354506e793294f2280a1c95715fd157e78a
|
|
| MD5 |
d58363e4630e335548f9e3685114b570
|
|
| BLAKE2b-256 |
0a0faf8c67758307f6c5acf5bde3b1a3908cd53fd8a3bfdaa0c31a15cbb1f778
|
Provenance
The following attestation bundles were made for digitalkin_proto-0.1.8-py3-none-any.whl:
Publisher:
publish.yml on DigitalKin-ai/service-apis-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
digitalkin_proto-0.1.8-py3-none-any.whl -
Subject digest:
3b2ea5f235f3fada2a1335e9358ad354506e793294f2280a1c95715fd157e78a - Sigstore transparency entry: 204836105
- Sigstore integration time:
-
Permalink:
DigitalKin-ai/service-apis-py@b01ac94b48eb9c982750328d33c99bfb042a926c -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/DigitalKin-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b01ac94b48eb9c982750328d33c99bfb042a926c -
Trigger Event:
release
-
Statement type: