Stencil Python client
Stencil Python client package provides a store to lookup protobuf descriptors and options to keep the protobuf descriptors upto date.
It has following features
- Deserialize protobuf messages directly by specifying protobuf message name
- Ability to refresh protobuf descriptors in specified intervals
- Support to download descriptors from multiple urls
Requirements
- Python 3.7+
Installation
Use pip
pip3 install stencil-python-client
Then import the stencil package into your own code as mentioned below
from odpf import stencil
Usage
Creating a client
from odpf import stencil
url = "http://url/to/proto/descriptorset/file"
client = stencil.Client(url)
Creating a multiURLClient
from odpf import stencil
urls = ["http://urlA", "http://urlB"]
client = stencil.MultiUrlClient(urls)
Get Descriptor
from odpf import stencil
url = "http://url/to/proto/descriptorset/file"
client = stencil.Client(url)
client.get_descriptor("google.protobuf.DescriptorProto")
Parse protobuf message.
from odpf import stencil
url = "http://url/to/proto/descriptorset/file"
client = stencil.Client(url)
data = ""
desc = client.parse("google.protobuf.DescriptorProto", data)
Refer to stencil documentation for more information what you can do in stencil.
Metadata
Release files for stencil-python-client 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stencil-python-client-0.0.1.tar.gz | 6.9 kB | Details |
Release files / stencil-python-client-0.0.1.tar.gz
| Download URL | stencil-python-client-0.0.1.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be8915d79f7f99de09fc531af19388d82aa1d70a0c00290025792543f6693f2a
|
|
BLAKE2b-256 checksum How to use checksums |
a8c10370ff9fc7edc13846ccebf679b06f260dbe14ebc3cb2049d91ce3280389
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.7.1 requests/2.26.0 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
|