dimples 1.3.0__tar.gz → 1.3.1__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 (184) hide show
  1. dimples-1.3.1/PKG-INFO +69 -0
  2. dimples-1.3.1/README.md +55 -0
  3. {dimples-1.3.0 → dimples-1.3.1}/dimples/__init__.py +268 -108
  4. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/__init__.py +19 -8
  5. dimples-1.3.0/dimples/client/archivist.py → dimples-1.3.1/dimples/client/checker.py +81 -73
  6. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/checkpoint.py +8 -7
  7. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/cpu/__init__.py +12 -0
  8. dimples-1.3.1/dimples/client/cpu/commands.py +99 -0
  9. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/cpu/creator.py +15 -20
  10. dimples-1.3.1/dimples/client/cpu/customized.py +129 -0
  11. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/cpu/group.py +3 -3
  12. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/cpu/grp_invite.py +1 -1
  13. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/cpu/grp_join.py +1 -1
  14. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/cpu/grp_query.py +2 -2
  15. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/cpu/handshake.py +4 -4
  16. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/facebook.py +70 -28
  17. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/messenger.py +140 -91
  18. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/network/session.py +36 -14
  19. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/network/state.py +1 -1
  20. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/packer.py +100 -100
  21. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/processor.py +26 -20
  22. dimples-1.3.1/dimples/client/terminal.py +292 -0
  23. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/__init__.py +26 -11
  24. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/anonymous.py +4 -4
  25. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/ans.py +1 -1
  26. dimples-1.3.1/dimples/common/archivist.py +141 -0
  27. dimples-1.3.1/dimples/common/checker.py +282 -0
  28. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/compat/__init__.py +19 -23
  29. dimples-1.3.1/dimples/common/compat/address.py +97 -0
  30. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/compat/compatible.py +40 -44
  31. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/compat/entity.py +44 -15
  32. dimples-1.3.1/dimples/common/compat/loader.py +114 -0
  33. dimples-1.3.1/dimples/common/compat/meta.py +81 -0
  34. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/dbi/__init__.py +9 -3
  35. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/dbi/account.py +4 -3
  36. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/dbi/session.py +24 -23
  37. dimples-1.3.1/dimples/common/facebook.py +299 -0
  38. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/messenger.py +20 -19
  39. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/packer.py +23 -54
  40. dimples-1.3.1/dimples/common/processer.py +140 -0
  41. dimples-1.3.1/dimples/common/protocol/__init__.py +69 -0
  42. dimples-1.3.1/dimples/common/protocol/customized.py +125 -0
  43. dimples-1.3.1/dimples/common/protocol/group.py +96 -0
  44. dimples-1.3.0/dimples/client/cpu/commands.py → dimples-1.3.1/dimples/common/protocol/password.py +37 -22
  45. dimples-1.3.1/dimples/common/protocol/utils.py +82 -0
  46. dimples-1.3.1/dimples/common/protocol/version.py +115 -0
  47. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/register.py +6 -6
  48. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/session.py +10 -4
  49. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/__init__.py +3 -2
  50. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/gate.py +1 -1
  51. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/gatekeeper.py +5 -5
  52. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/session.py +5 -3
  53. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/__init__.py +8 -1
  54. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/account.py +2 -1
  55. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/dos/document.py +4 -4
  56. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/t_cipherkey.py +2 -2
  57. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/t_document.py +4 -4
  58. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/t_group_keys.py +34 -18
  59. {dimples-1.3.0 → dimples-1.3.1}/dimples/edge/__init__.py +6 -3
  60. dimples-1.3.1/dimples/edge/messenger.py +184 -0
  61. dimples-1.3.1/dimples/edge/octopus.py +238 -0
  62. {dimples-1.3.0 → dimples-1.3.1}/dimples/edge/shared.py +143 -90
  63. {dimples-1.3.0 → dimples-1.3.1}/dimples/edge/start.py +67 -16
  64. dimples-1.3.1/dimples/emitter.py +377 -0
  65. {dimples-1.3.0 → dimples-1.3.1}/dimples/group/__init__.py +10 -0
  66. {dimples-1.3.0 → dimples-1.3.1}/dimples/group/admin.py +14 -25
  67. {dimples-1.3.0 → dimples-1.3.1}/dimples/group/builder.py +12 -29
  68. dimples-1.3.1/dimples/group/delegate.py +424 -0
  69. {dimples-1.3.0 → dimples-1.3.1}/dimples/group/emitter.py +35 -36
  70. {dimples-1.3.0 → dimples-1.3.1}/dimples/group/helper.py +9 -24
  71. {dimples-1.3.0 → dimples-1.3.1}/dimples/group/manager.py +17 -36
  72. {dimples-1.3.0 → dimples-1.3.1}/dimples/group/packer.py +7 -17
  73. dimples-1.3.1/dimples/group/shared.py +272 -0
  74. {dimples-1.3.0 → dimples-1.3.1}/dimples/register/__init__.py +19 -0
  75. {dimples-1.3.0 → dimples-1.3.1}/dimples/register/base.py +13 -12
  76. {dimples-1.3.0 → dimples-1.3.1}/dimples/register/ext.py +7 -4
  77. {dimples-1.3.0 → dimples-1.3.1}/dimples/register/run.py +11 -52
  78. {dimples-1.3.0 → dimples-1.3.1}/dimples/register/shared.py +86 -3
  79. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/__init__.py +14 -6
  80. dimples-1.3.0/dimples/server/archivist.py → dimples-1.3.1/dimples/server/checker.py +65 -47
  81. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/cpu/__init__.py +8 -2
  82. dimples-1.3.1/dimples/server/cpu/creator.py +69 -0
  83. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/cpu/document.py +1 -1
  84. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/cpu/handshake.py +6 -4
  85. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/cpu/login.py +1 -1
  86. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/deliver.py +2 -1
  87. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/dis_roamer.py +6 -0
  88. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/dispatcher.py +5 -5
  89. dimples-1.3.1/dimples/server/facebook.py +105 -0
  90. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/messenger.py +7 -6
  91. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/packer.py +118 -57
  92. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/processor.py +32 -123
  93. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/push.py +7 -2
  94. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/session.py +4 -3
  95. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/session_center.py +8 -6
  96. {dimples-1.3.0 → dimples-1.3.1}/dimples/station/handler.py +1 -1
  97. {dimples-1.3.0 → dimples-1.3.1}/dimples/station/shared.py +150 -111
  98. {dimples-1.3.0 → dimples-1.3.1}/dimples/station/start.py +12 -21
  99. {dimples-1.3.0 → dimples-1.3.1}/dimples/utils/__init__.py +6 -6
  100. {dimples-1.3.0 → dimples-1.3.1}/dimples/utils/cache.py +5 -3
  101. dimples-1.3.1/dimples/utils/checker.py +104 -0
  102. {dimples-1.3.0 → dimples-1.3.1}/dimples/utils/config.py +4 -2
  103. {dimples-1.3.0 → dimples-1.3.1}/dimples/utils/log.py +4 -4
  104. dimples-1.3.1/dimples.egg-info/PKG-INFO +69 -0
  105. {dimples-1.3.0 → dimples-1.3.1}/dimples.egg-info/SOURCES.txt +18 -5
  106. dimples-1.3.1/dimples.egg-info/requires.txt +6 -0
  107. {dimples-1.3.0 → dimples-1.3.1}/setup.py +9 -9
  108. dimples-1.3.0/PKG-INFO +0 -22
  109. dimples-1.3.0/README.md +0 -8
  110. dimples-1.3.0/dimples/client/terminal.py +0 -157
  111. dimples-1.3.0/dimples/common/archivist.py +0 -230
  112. dimples-1.3.0/dimples/common/compat/btc.py +0 -111
  113. dimples-1.3.0/dimples/common/compat/meta.py +0 -162
  114. dimples-1.3.0/dimples/common/facebook.py +0 -239
  115. dimples-1.3.0/dimples/common/processer.py +0 -70
  116. dimples-1.3.0/dimples/common/protocol/__init__.py +0 -71
  117. dimples-1.3.0/dimples/edge/octopus.py +0 -399
  118. dimples-1.3.0/dimples/group/delegate.py +0 -182
  119. dimples-1.3.0/dimples/utils/runner.py +0 -24
  120. dimples-1.3.0/dimples.egg-info/PKG-INFO +0 -22
  121. dimples-1.3.0/dimples.egg-info/requires.txt +0 -9
  122. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/cpu/grp_expel.py +0 -0
  123. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/cpu/grp_quit.py +0 -0
  124. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/cpu/grp_reset.py +0 -0
  125. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/cpu/grp_resign.py +0 -0
  126. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/network/__init__.py +0 -0
  127. {dimples-1.3.0 → dimples-1.3.1}/dimples/client/network/transition.py +0 -0
  128. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/compat/network.py +0 -0
  129. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/dbi/message.py +0 -0
  130. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/protocol/ans.py +0 -0
  131. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/protocol/block.py +0 -0
  132. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/protocol/handshake.py +0 -0
  133. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/protocol/login.py +0 -0
  134. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/protocol/mute.py +0 -0
  135. {dimples-1.3.0 → dimples-1.3.1}/dimples/common/protocol/report.py +0 -0
  136. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/flexible.py +0 -0
  137. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/mars.py +0 -0
  138. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/mtp.py +0 -0
  139. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/protocol/__init__.py +0 -0
  140. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/protocol/mars.py +0 -0
  141. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/protocol/ws.py +0 -0
  142. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/queue.py +0 -0
  143. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/seeker.py +0 -0
  144. {dimples-1.3.0 → dimples-1.3.1}/dimples/conn/ws.py +0 -0
  145. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/dos/__init__.py +0 -0
  146. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/dos/base.py +0 -0
  147. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/dos/group.py +0 -0
  148. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/dos/group_history.py +0 -0
  149. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/dos/group_keys.py +0 -0
  150. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/dos/login.py +0 -0
  151. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/dos/meta.py +0 -0
  152. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/dos/private.py +0 -0
  153. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/dos/station.py +0 -0
  154. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/dos/user.py +0 -0
  155. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/message.py +0 -0
  156. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/redis/__init__.py +0 -0
  157. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/redis/base.py +0 -0
  158. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/redis/document.py +0 -0
  159. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/redis/group.py +0 -0
  160. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/redis/grp_history.py +0 -0
  161. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/redis/grp_keys.py +0 -0
  162. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/redis/login.py +0 -0
  163. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/redis/message.py +0 -0
  164. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/redis/meta.py +0 -0
  165. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/redis/station.py +0 -0
  166. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/redis/user.py +0 -0
  167. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/session.py +0 -0
  168. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/t_base.py +0 -0
  169. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/t_group.py +0 -0
  170. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/t_group_history.py +0 -0
  171. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/t_login.py +0 -0
  172. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/t_message.py +0 -0
  173. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/t_meta.py +0 -0
  174. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/t_private.py +0 -0
  175. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/t_station.py +0 -0
  176. {dimples-1.3.0 → dimples-1.3.1}/dimples/database/t_user.py +0 -0
  177. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/cpu/ans.py +0 -0
  178. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/cpu/report.py +0 -0
  179. {dimples-1.3.0 → dimples-1.3.1}/dimples/server/trace.py +0 -0
  180. {dimples-1.3.0 → dimples-1.3.1}/dimples/station/__init__.py +0 -0
  181. {dimples-1.3.0 → dimples-1.3.1}/dimples.egg-info/dependency_links.txt +0 -0
  182. {dimples-1.3.0 → dimples-1.3.1}/dimples.egg-info/entry_points.txt +0 -0
  183. {dimples-1.3.0 → dimples-1.3.1}/dimples.egg-info/top_level.txt +0 -0
  184. {dimples-1.3.0 → dimples-1.3.1}/setup.cfg +0 -0
dimples-1.3.1/PKG-INFO ADDED
@@ -0,0 +1,69 @@
1
+ Metadata-Version: 2.1
2
+ Name: dimples
3
+ Version: 1.3.1
4
+ Summary: DIMP Library for Edges and Stations
5
+ Home-page: https://github.com/dimchat/demo-py
6
+ Author: Albert Moky
7
+ Author-email: albert.moky@gmail.com
8
+ License: MIT
9
+ Description: # DIMP Library for Edges and Stations (Python version)
10
+
11
+ [![License](https://img.shields.io/github/license/dimchat/demo-py)](https://github.com/dimchat/demo-py/blob/master/LICENSE)
12
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/dimchat/demo-py/pulls)
13
+ [![Platform](https://img.shields.io/badge/Platform-Python%203-brightgreen.svg)](https://github.com/dimchat/demo-py/wiki)
14
+ [![Issues](https://img.shields.io/github/issues/dimchat/demo-py)](https://github.com/dimchat/demo-py/issues)
15
+ [![Repo Size](https://img.shields.io/github/repo-size/dimchat/demo-py)](https://github.com/dimchat/demo-py/archive/refs/heads/main.zip)
16
+ [![Tags](https://img.shields.io/github/tag/dimchat/demo-py)](https://github.com/dimchat/demo-py/tags)
17
+ [![Version](https://img.shields.io/pypi/v/dimples)](https://pypi.org/project/dimples)
18
+
19
+ [![Watchers](https://img.shields.io/github/watchers/dimchat/demo-py)](https://github.com/dimchat/demo-py/watchers)
20
+ [![Forks](https://img.shields.io/github/forks/dimchat/demo-py)](https://github.com/dimchat/demo-py/forks)
21
+ [![Stars](https://img.shields.io/github/stars/dimchat/demo-py)](https://github.com/dimchat/demo-py/stargazers)
22
+ [![Followers](https://img.shields.io/github/followers/dimchat)](https://github.com/orgs/dimchat/followers)
23
+
24
+ ## Dependencies
25
+
26
+ * setup.py
27
+
28
+ ```
29
+ install_requires=[
30
+ # 'pycryptodome', # 3.14.1
31
+ # 'base58', # 1.0.3
32
+ # 'ecdsa', # 0.16.1
33
+ 'dimplugins>=2.2.1',
34
+
35
+ 'dimsdk>=2.2.1',
36
+ # 'dimp>=2.2.1',
37
+ # 'dkd>=2.2.1',
38
+ # 'mkm>=2.2.1',
39
+
40
+ 'startrek>=2.2.1',
41
+ 'tcp>=2.2.1',
42
+ 'udp>=2.2.1',
43
+
44
+ 'aiou>=0.3.0',
45
+ ]
46
+ ```
47
+
48
+ * Latest Versions
49
+
50
+ | Name | Version | Description |
51
+ |------|---------|-------------|
52
+ | [Ming Ke Ming (名可名)](https://github.com/dimchat/mkm-py) | [![Version](https://img.shields.io/pypi/v/mkm)](https://pypi.org/project/mkm) | Decentralized User Identity Authentication |
53
+ | [Dao Ke Dao (道可道)](https://github.com/dimchat/dkd-py) | [![Version](https://img.shields.io/pypi/v/dkd)](https://pypi.org/project/dkd) | Universal Message Module |
54
+ | [DIMP (去中心化通讯协议)](https://github.com/dimchat/core-py) | [![Version](https://img.shields.io/pypi/v/dimp)](https://pypi.org/project/dimp) | Decentralized Instant Messaging Protocol |
55
+ | [DIM SDK](https://github.com/dimchat/sdk-py) | [![Version](https://img.shields.io/pypi/v/dimsdk)](https://pypi.org/project/dimsdk) | Software Development Kit |
56
+ | [DIM Plugins](https://github.com/dimchat/sdk-dart) | [![Version](https://img.shields.io/pypi/v/dimplugins)](https://pypi.org/project/dimplugins) | Cryptography & Account Plugins |
57
+
58
+ Talk is cheap, [read my codes](https://github.com/dimchat/demo-py).
59
+
60
+ ----
61
+
62
+ Copyright © 2018-2025 Albert Moky
63
+ [![Followers](https://img.shields.io/github/followers/moky)](https://github.com/moky?tab=followers)
64
+
65
+ Platform: UNKNOWN
66
+ Classifier: Programming Language :: Python :: 3
67
+ Classifier: License :: OSI Approved :: MIT License
68
+ Classifier: Operating System :: OS Independent
69
+ Description-Content-Type: text/markdown
@@ -0,0 +1,55 @@
1
+ # DIMP Library for Edges and Stations (Python version)
2
+
3
+ [![License](https://img.shields.io/github/license/dimchat/demo-py)](https://github.com/dimchat/demo-py/blob/master/LICENSE)
4
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/dimchat/demo-py/pulls)
5
+ [![Platform](https://img.shields.io/badge/Platform-Python%203-brightgreen.svg)](https://github.com/dimchat/demo-py/wiki)
6
+ [![Issues](https://img.shields.io/github/issues/dimchat/demo-py)](https://github.com/dimchat/demo-py/issues)
7
+ [![Repo Size](https://img.shields.io/github/repo-size/dimchat/demo-py)](https://github.com/dimchat/demo-py/archive/refs/heads/main.zip)
8
+ [![Tags](https://img.shields.io/github/tag/dimchat/demo-py)](https://github.com/dimchat/demo-py/tags)
9
+ [![Version](https://img.shields.io/pypi/v/dimples)](https://pypi.org/project/dimples)
10
+
11
+ [![Watchers](https://img.shields.io/github/watchers/dimchat/demo-py)](https://github.com/dimchat/demo-py/watchers)
12
+ [![Forks](https://img.shields.io/github/forks/dimchat/demo-py)](https://github.com/dimchat/demo-py/forks)
13
+ [![Stars](https://img.shields.io/github/stars/dimchat/demo-py)](https://github.com/dimchat/demo-py/stargazers)
14
+ [![Followers](https://img.shields.io/github/followers/dimchat)](https://github.com/orgs/dimchat/followers)
15
+
16
+ ## Dependencies
17
+
18
+ * setup.py
19
+
20
+ ```
21
+ install_requires=[
22
+ # 'pycryptodome', # 3.14.1
23
+ # 'base58', # 1.0.3
24
+ # 'ecdsa', # 0.16.1
25
+ 'dimplugins>=2.2.1',
26
+
27
+ 'dimsdk>=2.2.1',
28
+ # 'dimp>=2.2.1',
29
+ # 'dkd>=2.2.1',
30
+ # 'mkm>=2.2.1',
31
+
32
+ 'startrek>=2.2.1',
33
+ 'tcp>=2.2.1',
34
+ 'udp>=2.2.1',
35
+
36
+ 'aiou>=0.3.0',
37
+ ]
38
+ ```
39
+
40
+ * Latest Versions
41
+
42
+ | Name | Version | Description |
43
+ |------|---------|-------------|
44
+ | [Ming Ke Ming (名可名)](https://github.com/dimchat/mkm-py) | [![Version](https://img.shields.io/pypi/v/mkm)](https://pypi.org/project/mkm) | Decentralized User Identity Authentication |
45
+ | [Dao Ke Dao (道可道)](https://github.com/dimchat/dkd-py) | [![Version](https://img.shields.io/pypi/v/dkd)](https://pypi.org/project/dkd) | Universal Message Module |
46
+ | [DIMP (去中心化通讯协议)](https://github.com/dimchat/core-py) | [![Version](https://img.shields.io/pypi/v/dimp)](https://pypi.org/project/dimp) | Decentralized Instant Messaging Protocol |
47
+ | [DIM SDK](https://github.com/dimchat/sdk-py) | [![Version](https://img.shields.io/pypi/v/dimsdk)](https://pypi.org/project/dimsdk) | Software Development Kit |
48
+ | [DIM Plugins](https://github.com/dimchat/sdk-dart) | [![Version](https://img.shields.io/pypi/v/dimplugins)](https://pypi.org/project/dimplugins) | Cryptography & Account Plugins |
49
+
50
+ Talk is cheap, [read my codes](https://github.com/dimchat/demo-py).
51
+
52
+ ----
53
+
54
+ Copyright © 2018-2025 Albert Moky
55
+ [![Followers](https://img.shields.io/github/followers/moky)](https://github.com/moky?tab=followers)
@@ -33,8 +33,13 @@ from dimsdk.cpu import *
33
33
  from dimplugins import *
34
34
 
35
35
  from .common import *
36
+ from .conn import *
37
+ from .database import *
36
38
  from .group import *
37
39
 
40
+ from .emitter import Emitter
41
+
42
+
38
43
  name = 'DIMPLES'
39
44
 
40
45
  __author__ = 'Albert Moky'
@@ -42,12 +47,19 @@ __author__ = 'Albert Moky'
42
47
 
43
48
  __all__ = [
44
49
 
50
+ 'Emitter',
51
+
52
+ ####################################
45
53
  #
46
- # Types
54
+ # SDK
47
55
  #
56
+ ####################################
57
+
58
+ 'Singleton',
48
59
 
49
60
  'URI', 'DateTime',
50
- 'Converter',
61
+
62
+ 'Converter', 'Copier',
51
63
  'Wrapper', 'Stringer', 'Mapper',
52
64
  'ConstantString', # 'String',
53
65
  'Dictionary',
@@ -56,18 +68,20 @@ __all__ = [
56
68
  # Data Format
57
69
  #
58
70
 
59
- 'DataCoder', 'Hex', 'Base64', 'Base58',
60
- 'ObjectCoder', 'JSON', 'MapCoder', 'JSONMap', 'ListCoder', 'JSONList',
71
+ 'DataCoder', 'Hex', 'Base58', 'Base64',
72
+ 'ObjectCoder', 'JSON',
73
+ 'MapCoder', 'JSONMap',
74
+ 'ListCoder', 'JSONList',
61
75
  'StringCoder', 'UTF8',
62
76
 
63
77
  'hex_encode', 'hex_decode',
64
- 'base64_encode', 'base64_decode', 'base58_encode', 'base58_decode',
78
+ 'base58_encode', 'base58_decode',
79
+ 'base64_encode', 'base64_decode',
65
80
  'json_encode', 'json_decode',
66
81
  'utf8_encode', 'utf8_decode',
67
82
 
68
83
  'TransportableData', 'TransportableDataFactory',
69
84
  'PortableNetworkFile', 'PortableNetworkFileFactory',
70
- 'FormatGeneralFactory', 'FormatFactoryManager',
71
85
 
72
86
  #
73
87
  # Data Digest
@@ -81,45 +95,12 @@ __all__ = [
81
95
  # Crypto Keys
82
96
  #
83
97
 
84
- 'CryptographyKey', 'EncryptKey', 'DecryptKey',
85
- 'AsymmetricKey', 'SignKey', 'VerifyKey',
86
- 'SymmetricKey', 'SymmetricKeyFactory',
87
- 'PublicKey', 'PublicKeyFactory',
88
- 'PrivateKey', 'PrivateKeyFactory',
89
-
90
- 'CryptographyKeyGeneralFactory', 'CryptographyKeyFactoryManager',
98
+ 'CryptographyKey',
99
+ 'EncryptKey', 'DecryptKey', 'SignKey', 'VerifyKey',
100
+ 'SymmetricKey', 'AsymmetricKey',
101
+ 'PrivateKey', 'PublicKey',
91
102
 
92
- #
93
- # MingKeMing
94
- #
95
-
96
- 'EntityType', 'MetaType',
97
- 'Address', 'AddressFactory',
98
- 'ID', 'IDFactory',
99
- 'Meta', 'MetaFactory',
100
- # 'TAI',
101
- 'Document', 'DocumentFactory',
102
- 'Visa', 'Bulletin',
103
-
104
- 'BroadcastAddress', 'Identifier',
105
- 'AccountGeneralFactory', 'AccountFactoryManager',
106
- 'ANYWHERE', 'EVERYWHERE', 'ANYONE', 'EVERYONE', 'FOUNDER',
107
-
108
- #
109
- # DaoKeDao
110
- #
111
-
112
- 'ContentType', 'Content', 'ContentFactory',
113
- 'Envelope', 'EnvelopeFactory',
114
- 'Message', 'InstantMessage', 'SecureMessage', 'ReliableMessage',
115
- 'InstantMessageFactory', 'SecureMessageFactory', 'ReliableMessageFactory',
116
-
117
- 'InstantMessageDelegate', 'SecureMessageDelegate', 'ReliableMessageDelegate',
118
- 'MessageGeneralFactory', 'MessageFactoryManager',
119
-
120
- #
121
- # Crypto core
122
- #
103
+ 'SymmetricKeyFactory', 'PrivateKeyFactory', 'PublicKeyFactory',
123
104
 
124
105
  'BaseKey', 'BaseSymmetricKey',
125
106
  'BaseAsymmetricKey', 'BasePublicKey', 'BasePrivateKey',
@@ -128,99 +109,135 @@ __all__ = [
128
109
  'BaseFileWrapper',
129
110
 
130
111
  #
131
- # MingKeMing core
112
+ # MingKeMing
132
113
  #
133
114
 
134
- 'BaseMeta', 'MetaHelper',
135
- 'BaseDocument', 'BaseVisa', 'BaseBulletin', 'DocumentHelper',
115
+ 'EntityType',
116
+ 'Address',
117
+ 'ID',
118
+ 'Meta',
119
+ 'Document', 'Visa', 'Bulletin',
136
120
 
137
- 'EntityDelegate',
138
- 'Entity', 'EntityDataSource', 'BaseEntity',
139
- 'User', 'UserDataSource', 'BaseUser',
140
- 'Group', 'GroupDataSource', 'BaseGroup',
121
+ 'AddressFactory',
122
+ 'IDFactory',
123
+ 'MetaFactory',
124
+ 'DocumentFactory',
125
+
126
+ 'Identifier',
127
+ 'ANYONE', 'EVERYONE', 'FOUNDER',
128
+ 'ANYWHERE', 'EVERYWHERE',
129
+ # 'BroadcastAddress',
130
+
131
+ 'BaseMeta',
132
+ 'BaseDocument', 'BaseVisa', 'BaseBulletin',
141
133
 
142
134
  #
143
- # Protocol core
135
+ # DaoKeDao
144
136
  #
145
137
 
138
+ 'ContentType',
139
+ 'Content',
140
+ 'Envelope',
141
+ 'Message',
142
+ 'InstantMessage', 'SecureMessage', 'ReliableMessage',
143
+
144
+ # contents
146
145
  'TextContent', 'ArrayContent', 'ForwardContent',
147
146
  'PageContent', 'NameCard',
148
147
  'FileContent', 'ImageContent', 'AudioContent', 'VideoContent',
149
148
  'MoneyContent', 'TransferContent',
150
- 'CustomizedContent',
149
+ 'QuoteContent', 'CombineContent',
151
150
 
152
- 'Command', 'CommandFactory',
151
+ # commands
152
+ 'Command',
153
153
  'MetaCommand', 'DocumentCommand',
154
- 'ReceiptCommand', 'ReceiptCommandMixIn',
154
+ 'ReceiptCommand',
155
155
 
156
+ # group history
156
157
  'HistoryCommand', 'GroupCommand',
157
158
  'InviteCommand', 'ExpelCommand', 'JoinCommand', 'QuitCommand', 'QueryCommand', 'ResetCommand',
158
159
  'HireCommand', 'FireCommand', 'ResignCommand',
159
160
 
160
- #
161
- # DaoKeDao core
162
- #
163
-
161
+ # extend contents
164
162
  'BaseContent',
165
163
  'BaseTextContent', 'ListContent', 'SecretContent',
166
164
  'WebPageContent', 'NameCardContent',
167
165
  'BaseFileContent', 'ImageFileContent', 'AudioFileContent', 'VideoFileContent',
168
166
  'BaseMoneyContent', 'TransferMoneyContent',
169
- 'AppCustomizedContent',
167
+ 'BaseQuoteContent', 'CombineForwardContent',
170
168
 
169
+ # extend commands
171
170
  'BaseCommand',
172
171
  'BaseMetaCommand', 'BaseDocumentCommand',
173
- 'BaseReceipt', 'BaseReceiptCommand',
172
+ 'BaseReceiptCommand',
174
173
 
174
+ # extend group history
175
175
  'BaseHistoryCommand', 'BaseGroupCommand',
176
176
  'InviteGroupCommand', 'ExpelGroupCommand', 'JoinGroupCommand',
177
177
  'QuitGroupCommand', 'QueryGroupCommand', 'ResetGroupCommand',
178
178
  'HireGroupCommand', 'FireGroupCommand', 'ResignGroupCommand',
179
179
 
180
- 'CommandGeneralFactory', 'CommandFactoryManager',
180
+ #
181
+ # Message
182
+ #
181
183
 
182
- 'MessageEnvelope', 'BaseMessage',
184
+ 'MessageEnvelope',
185
+ 'BaseMessage',
183
186
  'PlainMessage', 'EncryptedMessage', 'NetworkMessage',
184
187
 
188
+ # factories
189
+ 'ContentFactory', 'CommandFactory',
190
+ 'EnvelopeFactory',
191
+ 'InstantMessageFactory', 'SecureMessageFactory', 'ReliableMessageFactory',
192
+
193
+ # delegates
194
+ 'InstantMessageDelegate', 'SecureMessageDelegate', 'ReliableMessageDelegate',
195
+
185
196
  #
186
197
  # Core
187
198
  #
188
199
 
189
200
  'Barrack', 'Transceiver', 'Packer', 'Processor',
201
+ 'CipherKeyDelegate',
190
202
 
191
203
  #
192
204
  # MingKeMing extends
193
205
  #
194
206
 
207
+ 'EntityDelegate',
208
+ 'Entity', 'EntityDataSource', 'BaseEntity',
209
+ 'User', 'UserDataSource', 'BaseUser',
210
+ 'Group', 'GroupDataSource', 'BaseGroup',
211
+
195
212
  'ServiceProvider', 'Station', 'Bot',
196
213
 
197
- #
198
- # DaoKeDao extends
199
- #
214
+ 'MemberType',
200
215
 
201
- 'InstantMessagePacker', 'SecureMessagePacker', 'ReliableMessagePacker',
202
- 'MessageFactory',
216
+ 'MetaUtils', 'DocumentUtils',
203
217
 
204
218
  #
205
- # Core extends
219
+ # DaoKeDao extends
206
220
  #
207
221
 
208
- 'TwinsHelper',
209
-
210
- 'ContentProcessor', 'ContentProcessorCreator', 'ContentProcessorFactory',
222
+ 'ContentProcessor',
223
+ 'ContentProcessorCreator',
224
+ 'ContentProcessorFactory',
211
225
  'GeneralContentProcessorFactory',
212
226
 
213
- 'ContentFactoryBuilder', 'CommandFactoryBuilder',
214
- 'GeneralCommandFactory', 'HistoryCommandFactory', 'GroupCommandFactory',
227
+ 'GeneralCommandFactory',
228
+ 'HistoryCommandFactory',
229
+ 'GroupCommandFactory',
215
230
 
216
- 'register_content_factories', 'register_command_factories',
217
- 'register_message_factories', 'register_all_factories',
231
+ 'InstantMessagePacker', 'SecureMessagePacker', 'ReliableMessagePacker',
232
+ 'MessageFactory', 'MessageUtils',
218
233
 
219
234
  #
220
- # Extends
235
+ # Core extends
221
236
  #
222
237
 
223
- 'AddressNameService', 'CipherKeyDelegate',
238
+ 'TwinsHelper',
239
+
240
+ 'AddressNameService',
224
241
  'Archivist',
225
242
  'Facebook', 'Messenger',
226
243
  'MessageProcessor', 'MessagePacker',
@@ -231,20 +248,20 @@ __all__ = [
231
248
  #
232
249
  ####################################
233
250
 
234
- 'ContentProcessor', 'ContentProcessorCreator', 'ContentProcessorFactory',
251
+ 'ContentProcessor',
252
+ 'ContentProcessorCreator',
253
+ 'ContentProcessorFactory',
235
254
  'GeneralContentProcessorFactory',
236
255
 
237
- 'BaseContentProcessor', 'BaseCommandProcessor',
256
+ 'BaseContentProcessor',
257
+ 'BaseCommandProcessor',
238
258
 
239
- 'ForwardContentProcessor',
240
259
  'ArrayContentProcessor',
260
+ 'ForwardContentProcessor',
241
261
 
242
262
  'MetaCommandProcessor',
243
263
  'DocumentCommandProcessor',
244
264
 
245
- 'CustomizedContentProcessor',
246
- 'CustomizedContentHandler',
247
-
248
265
  'BaseContentProcessorCreator',
249
266
 
250
267
  ####################################
@@ -253,10 +270,18 @@ __all__ = [
253
270
  #
254
271
  ####################################
255
272
 
273
+ 'Base64Coder', 'Base58Coder', 'HexCoder',
274
+ 'JSONCoder', 'UTF8Coder',
275
+
256
276
  'Base64Data', 'Base64DataFactory',
257
277
  'BaseNetworkFile', 'BaseNetworkFileFactory',
258
278
 
259
- 'register_data_coders',
279
+ #
280
+ # Digest
281
+ #
282
+
283
+ 'MD5Digester', 'SHA1Digester', 'SHA256Digester',
284
+ 'Keccak256Digester', 'RipeMD160Digester',
260
285
 
261
286
  #
262
287
  # Crypto
@@ -271,32 +296,25 @@ __all__ = [
271
296
  'ECCPublicKey', 'ECCPublicKeyFactory',
272
297
  'ECCPrivateKey', 'ECCPrivateKeyFactory',
273
298
 
274
- 'register_data_digesters',
275
- 'register_symmetric_key_factories',
276
- 'register_asymmetric_key_factories',
277
-
278
299
  #
279
300
  # MingKeMing
280
301
  #
281
302
 
282
303
  'BTCAddress', 'ETHAddress',
283
- 'DefaultMeta', 'BTCMeta', 'ETHMeta',
304
+ 'BaseAddressFactory',
284
305
 
285
- 'BaseAddressFactory', 'GeneralAddressFactory',
286
306
  'GeneralIdentifierFactory',
287
- 'GeneralMetaFactory',
288
- 'GeneralDocumentFactory',
289
307
 
290
- 'register_address_factory',
291
- 'register_identifier_factory',
292
- 'register_meta_factories',
293
- 'register_document_factories',
308
+ 'DefaultMeta', 'BTCMeta', 'ETHMeta',
309
+ 'BaseMetaFactory',
310
+
311
+ 'GeneralDocumentFactory',
294
312
 
295
313
  #
296
- # Register
314
+ # Loader
297
315
  #
298
316
 
299
- 'register_plugins',
317
+ 'PluginLoader',
300
318
 
301
319
  ####################################
302
320
  #
@@ -304,17 +322,32 @@ __all__ = [
304
322
  #
305
323
  ####################################
306
324
 
325
+ 'MetaType',
326
+ 'Password',
327
+ 'BroadcastUtils',
328
+
329
+ #
330
+ # protocol
331
+ #
332
+
333
+ 'AnsCommand',
334
+
307
335
  'HandshakeCommand', 'HandshakeState',
308
336
  'LoginCommand',
309
- 'ReportCommand',
310
- 'AnsCommand',
311
337
 
312
338
  'BlockCommand',
313
339
  'MuteCommand',
314
340
 
341
+ 'ReportCommand',
342
+
343
+ 'GroupKeyCommand',
344
+
345
+ 'CustomizedContent', 'AppCustomizedContent',
346
+
315
347
  #
316
348
  # Database Interface
317
349
  #
350
+
318
351
  'PrivateKeyDBI', 'MetaDBI', 'DocumentDBI',
319
352
  'UserDBI', 'ContactDBI', 'GroupDBI', 'GroupHistoryDBI',
320
353
  'AccountDBI',
@@ -322,29 +355,156 @@ __all__ = [
322
355
  'ReliableMessageDBI', 'CipherKeyDBI', 'GroupKeysDBI',
323
356
  'MessageDBI',
324
357
 
325
- 'LoginDBI', 'ProviderDBI', 'StationDBI',
358
+ 'ProviderDBI', 'StationDBI', 'LoginDBI',
326
359
  'SessionDBI',
360
+
327
361
  'ProviderInfo', 'StationInfo',
328
362
 
329
363
  #
330
364
  # common
331
365
  #
332
- 'Anonymous', 'Register',
366
+
367
+ 'Anonymous',
333
368
  'AddressNameServer', 'ANSFactory',
369
+
370
+ 'EntityChecker',
334
371
  'CommonArchivist',
335
- 'CommonFacebook', 'CommonMessenger',
336
- 'CommonMessagePacker', 'CommonMessageProcessor',
372
+ 'CommonFacebook',
373
+
374
+ 'CommonMessenger',
375
+ 'CommonMessagePacker',
376
+ 'CommonMessageProcessor',
377
+ 'Vestibule',
378
+
337
379
  'Transmitter',
338
380
  'Session',
339
381
 
382
+ 'Register',
383
+
384
+ ####################################
385
+ #
386
+ # Connection
387
+ #
388
+ ####################################
389
+
390
+ 'Hub', 'Channel',
391
+ 'Connection', 'ConnectionDelegate', 'ConnectionState',
392
+ 'BaseChannel',
393
+ 'BaseHub', 'BaseConnection', 'ActiveConnection',
394
+
395
+ 'Ship', 'Arrival', 'Departure', 'DeparturePriority',
396
+ 'Porter', 'PorterStatus', 'PorterDelegate', 'Gate',
397
+ 'ArrivalShip', 'ArrivalHall', 'DepartureShip', 'DepartureHall',
398
+ 'Dock', 'LockedDock', 'StarPorter', 'StarGate',
399
+
400
+ #
401
+ # TCP
402
+ #
403
+ 'PlainArrival', 'PlainDeparture', 'PlainPorter',
404
+ 'StreamChannel', 'StreamHub', 'TCPServerHub', 'TCPClientHub',
405
+
406
+ #
407
+ # UDP
408
+ #
409
+ 'PackageArrival', 'PackageDeparture', 'PackagePorter',
410
+ 'PacketChannel', 'PacketHub', 'UDPServerHub', 'UDPClientHub',
411
+
412
+ #
413
+ # Protocol
414
+ #
415
+ 'WebSocket', 'NetMsg', 'NetMsgHead', 'NetMsgSeq',
416
+
417
+ #
418
+ # Network
419
+ #
420
+ 'WSArrival', 'WSDeparture', 'WSPorter',
421
+ 'MarsStreamArrival', 'MarsStreamDeparture', 'MarsStreamPorter',
422
+ 'MTPStreamArrival', 'MTPStreamDeparture', 'MTPStreamPorter',
423
+ 'FlexiblePorter',
424
+ 'CommonGate', 'TCPServerGate', 'TCPClientGate', 'UDPServerGate', 'UDPClientGate',
425
+ # 'GateKeeper',
426
+ 'MessageWrapper', 'MessageQueue',
427
+ 'BaseSession',
428
+
429
+ ####################################
430
+ #
431
+ # Database
432
+ #
433
+ ####################################
434
+
435
+ 'PrivateKeyDBI', 'MetaDBI', 'DocumentDBI',
436
+ 'UserDBI', 'ContactDBI', 'GroupDBI', 'GroupHistoryDBI',
437
+ 'AccountDBI',
438
+
439
+ 'ReliableMessageDBI', 'CipherKeyDBI', 'GroupKeysDBI',
440
+ 'MessageDBI',
441
+
442
+ 'ProviderDBI', 'StationDBI', 'LoginDBI',
443
+ 'SessionDBI',
444
+ 'ProviderInfo', 'StationInfo',
445
+
446
+ #
447
+ # DOS
448
+ #
449
+
450
+ 'Storage',
451
+ 'PrivateKeyStorage', 'MetaStorage', 'DocumentStorage',
452
+ 'UserStorage', 'GroupStorage', 'GroupHistoryStorage',
453
+ 'GroupKeysStorage',
454
+ 'LoginStorage',
455
+ 'StationStorage',
456
+
457
+ #
458
+ # Redis
459
+ #
460
+
461
+ 'RedisConnector', 'RedisCache',
462
+
463
+ 'MetaCache', 'DocumentCache',
464
+ 'UserCache', 'LoginCache',
465
+ 'GroupCache', 'GroupHistoryCache', 'GroupKeysCache',
466
+ 'MessageCache',
467
+ 'StationCache',
468
+
469
+ #
470
+ # Table
471
+ #
472
+
473
+ 'DbInfo', 'DbTask',
474
+
475
+ 'PrivateKeyTable', 'MetaTable', 'DocumentTable',
476
+ 'UserTable', 'GroupTable', 'GroupHistoryTable',
477
+ 'GroupKeysTable',
478
+ 'ReliableMessageTable', 'CipherKeyTable',
479
+ 'LoginTable', 'StationTable',
480
+
481
+ #
482
+ # Database
483
+ #
484
+
485
+ 'AccountDatabase',
486
+ 'MessageDatabase',
487
+ 'SessionDatabase',
488
+
340
489
  ####################################
341
490
  #
342
491
  # Group
343
492
  #
344
493
  ####################################
345
494
 
346
- 'GroupDelegate', 'GroupPacker', 'GroupEmitter',
347
- 'GroupCommandHelper', 'GroupHistoryBuilder',
348
- 'GroupManager', 'AdminManager',
495
+ 'TripletsHelper',
496
+ # 'GroupBotsManager',
497
+
498
+ 'GroupDelegate',
499
+ 'GroupPacker',
500
+ 'GroupEmitter',
501
+
502
+ 'GroupCommandHelper',
503
+ 'GroupHistoryBuilder',
504
+
505
+ 'GroupManager',
506
+ 'AdminManager',
507
+
508
+ 'SharedGroupManager',
349
509
 
350
510
  ]