-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPC runtime for python #9 #10
Conversation
kanghyojun
commented
Jul 30, 2016
•
edited
Loading
edited
- Implement Service, WsgiApp to create nirum rpc service
- Add nirum.rpc.WsgiApp, nirum.rpc.Service
- Return appropriate error message / success response
- Support /ping/ by default
- Fix deserializers
- deserialize by class not from given data
- deserialize generic type(eg. typing.Sequence) as python type
- deserialize primitive type
@@ -25,6 +25,7 @@ def get_version(): | |||
|
|||
install_requires = [ | |||
'setuptools', | |||
'werkzeug >= 0.11, < 0.12', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PyPI 핸들 이름으로는 첫 글자가 대문자로 되어 있던데…
- Implement Service, WsgiApp to create nirum rpc service - Add nirum.rpc.WsgiApp, nirum.rpc.Service - Return appropriate error message / success response - Support /ping/ by default - Fix deserializers - deserialize by class not from given data - deserialize generic type(eg. typing.Sequence) as python type - deserialize primitive type
if type_ is data_type: | ||
return True | ||
else: | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 코드는 any()
함수 쓰면 간단하게 해결될 듯
|
||
def deserialize_primitive(cls, data): | ||
if cls is datetime.datetime: | ||
d = datetime.datetime.strptime(data, '%Y-%m-%dT%H:%M:%S.%f') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%Z
도 읽어야 할걸요
) | ||
if not callable(service_method): | ||
return self.error( | ||
400, | ||
request, | ||
message="Remote procedure '{}' is not callable.".format( | ||
request_method | ||
method_facial_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀