-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement RPC runtime for python #9 - 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 * Fix deserialize_tuple_type, reviews * Divide rpc requirements into service_requires * Parse datetime by using iso8601 * All name can have behind name * Reveal behind name in error message
- Loading branch information
1 parent
bc1fb46
commit df4c06c
Showing
6 changed files
with
881 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""":mod:nirum.exc` | ||
~~~~~~~~~~~~~~~~~~ | ||
""" | ||
__all__ = ( | ||
'InvalidNirumServiceMethodNameError', | ||
'InvalidNirumServiceMethodTypeError', | ||
'NirumProcedureArgumentError', | ||
'NirumProcedureArgumentRequiredError', | ||
'NirumProcedureArgumentValueError', | ||
'NirumServiceError', | ||
) | ||
|
||
|
||
class NirumServiceError(Exception): | ||
"""Base nirum service error""" | ||
|
||
|
||
class InvalidNirumServiceMethodNameError(ValueError, NirumServiceError): | ||
"""Raised when nirum service has invalid method name.""" | ||
|
||
|
||
class InvalidNirumServiceMethodTypeError(TypeError, NirumServiceError): | ||
"""Raised when nirum service method is not callable.""" | ||
|
||
|
||
class NirumProcedureArgumentError(ValueError, NirumServiceError): | ||
"""WIP""" | ||
|
||
|
||
class NirumProcedureArgumentRequiredError(NirumProcedureArgumentError): | ||
"""WIP""" | ||
|
||
|
||
class NirumProcedureArgumentValueError(NirumProcedureArgumentError): | ||
"""WIP""" |
Oops, something went wrong.