Skip to content
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

Merged
merged 6 commits into from
Aug 4, 2016
Merged

RPC runtime for python #9 #10

merged 6 commits into from
Aug 4, 2016

Conversation

kanghyojun
Copy link
Member

@kanghyojun kanghyojun commented Jul 30, 2016

  • 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',
Copy link
Member

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
@kanghyojun kanghyojun changed the title [WIP] RPC runtime for python #9 RPC runtime for python #9 Aug 4, 2016
if type_ is data_type:
return True
else:
return False
Copy link
Member

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')
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@kanghyojun kanghyojun merged commit df4c06c into nirum-lang:master Aug 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants