The Python micro framework for building gPRC application.
Project description
gRPCAlchemy
The Python micro framework for building gPRC application.
Free software: MIT license
Documentation: https://grpcalchemy.readthedocs.io.
Installation
$ pipenv install grpcalchemy
✨🍰✨
Only Python 3.6+ is supported.
Example
Server
from grpcalchemy.orm import Message, StringField
from grpcalchemy import Server, Context, grpcservice
class HelloMessage(Message):
__filename__ = 'hello'
text: str
class HelloService(Server):
@grpcservice
def Hello(self, request: HelloMessage, context: Context) -> HelloMessage:
return HelloMessage(text=f'Hello {request.text}')
if __name__ == '__main__':
HelloService().run()
Features
gPRC Service Support
- gRPC Message Support
Scalar Value Types
Message Types
Repeated Field
Maps
Define Message With Type Hint
Middleware
App Context Manger
Error Handler Support
TODO
Test Client Support
- gRPC Client Support
Thoroughly Deprecate pb2 and pb2_grpc file
Stream Method Support
History
0.4.0(2019-09-24)
Enable use type hint to define message
Add error handle to handle Exception
Add get_blueprints to get blueprints need to register
0.3.0(2019-08-19)
0.2.7-10(2019-04-16)
Support SSL
Improve Implement of Server with grpc.server
Support YAML file in Config Module
Improve Config Module
Add context in current rpc
0.2.5-6(2019-03-06)
Implement Rpc Context
Improve Config Module
0.2.4(2019-03-01)
Implement Globals Variable
Implement APP Context
0.2.2-3 (2019-02-26)
Improve Config module
Improve rpc_call_wrap
0.2.1 (2019-02-14)
Implement Own gRPC Server
Implement gRPC Server Test Client
0.2.0 (2019-01-30)
Change gRPCAlchemy Server register to register_blueprint
Make gRPCAlchemy Server inherit from Blueprint
Support Json Format
Support Inheritance Message
0.1.6 (2019-01-21)
Various bug-fixes
Improve tests
Change Client API
Add PreProcess And PostProcess
Import Config Object
Add Event Listener
Change Field Object Into Descriptor
0.1.5 (2018-12-14)
Various bug-fixes
Improve tests
Add client
0.1.4 (2018-12-11)
First release on PyPI.
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
Hashes for grpcalchemy-0.4.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9552542e88c6fe7167eb75b70b9542d90393a1b7de325452fe4cf5bb4ef4ce0 |
|
MD5 | 7405a0c3affafb9884350ba1a6da26c8 |
|
BLAKE2b-256 | f6a270592bea153f6ea691f37ff2587534ef986e289458d91183f8fdbe0d1592 |