Skip to main content

gr8pc: A High-Level gRPC Wrapper for python

Project description

gr8pc: A High-Level gRPC Wrapper for python

This library is a direct adaptation of py-grpcio, featuring a few modifications and tailored customizations. Depending on your needs, you may find the original repository better suited to your requirements and preferred practices.


Background and Motivation

As noted before, gr8pc is an adaptation of the py-grpcio library, with a few key modifications:

  • Python 3.11 Compatibility: This library is compatible with Python 3.11 (the original library demands >=3.12).
  • Separation between Logic and Protobuf file Generation: gr8pc splits into two subprojects: one for the core server and client logic, and another (optional) CLI tool for .proto file generation. This design decision was made to make the dependency on jinja not necessary for the core library. In other words, the core library won't generate .proto files during runtime and will raise an error if it can't find them. The .proto file must be generated at development time using the CLI tool.

Installation

pip install gr8pc

To install the optional CLI:

pip install gr8gen

Usage

For usage documentation, please refer to the original py-grpcio repository.

Proto Generation Tool

$ gr8gen --help

usage: gr8gen [-h] [--version] [-o OUT] -s SVCS [SVCS ...]

A CLI tool for processing paths and services.

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -o OUT, --out OUT     Path for output. Must be an existing or new directory. (default: ./proto)
  -s SVCS [SVCS ...], --svcs SVCS [SVCS ...]
                        Python-like import path(s) for service(s). Example: 'path.to.class.Class'. (default: None)

The gr8gen tool generates the necessary .proto file. Usage:

gr8gen --output /path/to/proto/folder --service path.to.service.Service path.to.another.service.AnotherService

Acknowledgments

This library is derived directly from the py-grpcio package, maintaining much of the original structure and functionality.

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

gr8pc-0.1.6.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

gr8pc-0.1.6-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file gr8pc-0.1.6.tar.gz.

File metadata

  • Download URL: gr8pc-0.1.6.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.27

File hashes

Hashes for gr8pc-0.1.6.tar.gz
Algorithm Hash digest
SHA256 e251a7205fe63c3ddd6f5f07b928c8baae3b14cd01a921c77cba62ecefedcb35
MD5 73df2799129e00e7c59c966399034118
BLAKE2b-256 1834c1787a4ea9a048e33a9c7532e0a438037bfa103ede5dc883a00d35147ee8

See more details on using hashes here.

File details

Details for the file gr8pc-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: gr8pc-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.27

File hashes

Hashes for gr8pc-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fd526b09f5f293e9bf9225c618ae2c10051256a0301bf66d6f9dbee3d720b786
MD5 9ec68709c4c14a5dcfd383a913b31570
BLAKE2b-256 98d1d08606768d5b03eb51fdeae55e53fa3c828bacdbce4945cecb7000b9c2d4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page