avro-service-clients
Project description
Avro Service Clients Library
============================
Quick start example:
Create an Avro file and compile it into a schema:
protocol FooService {
string my_function(string my_arg);
}
Wire that up into an Avro IPC responder (e.g. https://github.com/packagelib/flask-avro)
Dump the schema into `/path/to/avro/schema/files/foo.avpr`
Set environment variables:
AVRO_SERVICE_CLIENTS_LOCAL_REGISTRY_PATH=/path/to/avro/schema/files
AVRO_SERVICE_CLIENTS_FOO_HOST=localhost
AVRO_SERVICE_CLIENTS_FOO_PORT=8080
AVRO_SERVICE_CLIENTS_FOO_PATH=/my/service/endpoint
Then use the library to make a client:
import avro_service_clients
client = avro_service_clients.get_client("foo")
client.my_function(my_arg="bar")
-------------------------------------------------------------------------------
0.0.4
-------------------------------------------------------------------------------
- Change version file setup.
-------------------------------------------------------------------------------
0.0.3
-------------------------------------------------------------------------------
- Initial public version.
-------------------------------------------------------------------------------
============================
Quick start example:
Create an Avro file and compile it into a schema:
protocol FooService {
string my_function(string my_arg);
}
Wire that up into an Avro IPC responder (e.g. https://github.com/packagelib/flask-avro)
Dump the schema into `/path/to/avro/schema/files/foo.avpr`
Set environment variables:
AVRO_SERVICE_CLIENTS_LOCAL_REGISTRY_PATH=/path/to/avro/schema/files
AVRO_SERVICE_CLIENTS_FOO_HOST=localhost
AVRO_SERVICE_CLIENTS_FOO_PORT=8080
AVRO_SERVICE_CLIENTS_FOO_PATH=/my/service/endpoint
Then use the library to make a client:
import avro_service_clients
client = avro_service_clients.get_client("foo")
client.my_function(my_arg="bar")
-------------------------------------------------------------------------------
0.0.4
-------------------------------------------------------------------------------
- Change version file setup.
-------------------------------------------------------------------------------
0.0.3
-------------------------------------------------------------------------------
- Initial public version.
-------------------------------------------------------------------------------
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
Close
Hashes for avro-service-clients-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3df6f18c3e988df2e6a30230d761f81287f79bdb7f5f438056dfa59042bab42 |
|
MD5 | cd9e691e98fc405e5668ae05b96c73aa |
|
BLAKE2b-256 | 0541ac994c272cb14dc4928ba6ae95a94fa8ac9e946d7de0718ae7004be73372 |