motorcortex-python 1.0.0rc1__tar.gz → 1.0.0rc2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. {motorcortex_python-1.0.0rc1/motorcortex_python.egg-info → motorcortex_python-1.0.0rc2}/PKG-INFO +1 -1
  2. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/__init__.py +48 -0
  3. motorcortex_python-1.0.0rc2/motorcortex/version.py +1 -0
  4. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2/motorcortex_python.egg-info}/PKG-INFO +1 -1
  5. motorcortex_python-1.0.0rc1/motorcortex/version.py +0 -1
  6. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/LICENSE +0 -0
  7. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/MANIFEST.in +0 -0
  8. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/README.md +0 -0
  9. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/_connection_state.py +0 -0
  10. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/_request_builders.py +0 -0
  11. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/_request_utils.py +0 -0
  12. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/_subscribe_dispatch.py +0 -0
  13. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/exceptions.py +0 -0
  14. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/init_threads.py +0 -0
  15. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/message_types.py +0 -0
  16. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/motorcortex_hash.json +0 -0
  17. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/motorcortex_pb2.py +0 -0
  18. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/motorcortex_pb2.pyi +0 -0
  19. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/nng_url.py +0 -0
  20. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/parameter_tree.py +0 -0
  21. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/py.typed +0 -0
  22. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/reply.py +0 -0
  23. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/request.py +0 -0
  24. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/session.py +0 -0
  25. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/setup_logger.py +0 -0
  26. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/state_callback_handler.py +0 -0
  27. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/subscribe.py +0 -0
  28. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/subscription.py +0 -0
  29. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex/timespec.py +0 -0
  30. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex_python.egg-info/SOURCES.txt +0 -0
  31. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex_python.egg-info/dependency_links.txt +0 -0
  32. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex_python.egg-info/requires.txt +0 -0
  33. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/motorcortex_python.egg-info/top_level.txt +0 -0
  34. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/pyproject.toml +0 -0
  35. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/setup.cfg +0 -0
  36. {motorcortex_python-1.0.0rc1 → motorcortex_python-1.0.0rc2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: motorcortex-python
3
- Version: 1.0.0rc1
3
+ Version: 1.0.0rc2
4
4
  Summary: Python bindings for Motorcortex Engine
5
5
  Home-page: https://www.motorcortex.io
6
6
  Author: Alexey Zakharov
@@ -14,6 +14,7 @@ Provides high-level APIs for communication, login, and data exchange using proto
14
14
  See documentation for usage examples.
15
15
  """
16
16
 
17
+ from enum import IntEnum as _IntEnum
17
18
  from typing import Any
18
19
 
19
20
  from motorcortex.version import __version__
@@ -39,6 +40,39 @@ from motorcortex.exceptions import (
39
40
  McxLoginError,
40
41
  McxTimeout,
41
42
  )
43
+ from motorcortex.motorcortex_pb2 import StatusCode as _PbStatusCode
44
+ from motorcortex.setup_logger import logger # not re-exported — ``__all__`` gates package surface
45
+
46
+ # Build an ``IntEnum`` facade over the protobuf ``StatusCode`` enum so
47
+ # callers can write ``motorcortex.StatusCode.OK`` without reaching into
48
+ # the generated protobuf module. Subclassing ``int`` means comparisons
49
+ # like ``reply.status == StatusCode.OK`` work against the raw ints that
50
+ # come back on the wire.
51
+ StatusCode = _IntEnum(
52
+ "StatusCode",
53
+ {v.name: v.number for v in _PbStatusCode.DESCRIPTOR.values},
54
+ )
55
+ StatusCode.__doc__ = (
56
+ "Motorcortex response status codes. Members mirror the ``StatusCode`` "
57
+ "enum in the wire protocol. Use ``motorcortex.StatusCode.OK`` (or the "
58
+ "flat re-exports such as ``motorcortex.OK``) to compare against "
59
+ "``reply.status``."
60
+ )
61
+
62
+ # Flat re-exports for the conventional ``motorcortex.OK`` idiom. Values
63
+ # are members of :class:`StatusCode` and therefore also ``int``.
64
+ OK = StatusCode.OK
65
+ READ_ONLY_MODE = StatusCode.READ_ONLY_MODE
66
+ FAILED = StatusCode.FAILED
67
+ FAILED_TO_DECODE = StatusCode.FAILED_TO_DECODE
68
+ SUB_LIST_IS_FULL = StatusCode.SUB_LIST_IS_FULL
69
+ WRONG_PARAMETER_PATH = StatusCode.WRONG_PARAMETER_PATH
70
+ FAILED_TO_SET_REQUESTED_FRQ = StatusCode.FAILED_TO_SET_REQUESTED_FRQ
71
+ FAILED_TO_OPEN_FILE = StatusCode.FAILED_TO_OPEN_FILE
72
+ GROUP_LIST_IS_FULL = StatusCode.GROUP_LIST_IS_FULL
73
+ WRONG_PASSWORD = StatusCode.WRONG_PASSWORD
74
+ USER_NOT_LOGGED_IN = StatusCode.USER_NOT_LOGGED_IN
75
+ PERMISSION_DENIED = StatusCode.PERMISSION_DENIED
42
76
 
43
77
  # ``__all__`` is the 1.0 public API surface. Anything not listed here —
44
78
  # including module-level helpers defined below (``parseUrl``,
@@ -72,6 +106,20 @@ __all__ = [
72
106
  "McxConnectionError",
73
107
  "McxLoginError",
74
108
  "McxTimeout",
109
+ # Status codes
110
+ "StatusCode",
111
+ "OK",
112
+ "READ_ONLY_MODE",
113
+ "FAILED",
114
+ "FAILED_TO_DECODE",
115
+ "SUB_LIST_IS_FULL",
116
+ "WRONG_PARAMETER_PATH",
117
+ "FAILED_TO_SET_REQUESTED_FRQ",
118
+ "FAILED_TO_OPEN_FILE",
119
+ "GROUP_LIST_IS_FULL",
120
+ "WRONG_PASSWORD",
121
+ "USER_NOT_LOGGED_IN",
122
+ "PERMISSION_DENIED",
75
123
  # Tuning
76
124
  "init_nng_threads",
77
125
  ]
@@ -0,0 +1 @@
1
+ __version__ = '1.0.0rc2'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: motorcortex-python
3
- Version: 1.0.0rc1
3
+ Version: 1.0.0rc2
4
4
  Summary: Python bindings for Motorcortex Engine
5
5
  Home-page: https://www.motorcortex.io
6
6
  Author: Alexey Zakharov
@@ -1 +0,0 @@
1
- __version__ = '1.0.0rc1'