bitswan 0.0.0__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 (561) hide show
  1. bitswan-0.0.0/.coveragerc +5 -0
  2. bitswan-0.0.0/.github/workflows/bitswan-release.yml +90 -0
  3. bitswan-0.0.0/.github/workflows/docker-publish-dockserver.yml +33 -0
  4. bitswan-0.0.0/.github/workflows/docker-publish.yml +31 -0
  5. bitswan-0.0.0/.github/workflows/test.yml +36 -0
  6. bitswan-0.0.0/.gitignore +118 -0
  7. bitswan-0.0.0/.gitlab-ci.yml +23 -0
  8. bitswan-0.0.0/Dockerfile +45 -0
  9. bitswan-0.0.0/LICENSE +29 -0
  10. bitswan-0.0.0/MANIFEST.in +3 -0
  11. bitswan-0.0.0/PKG-INFO +163 -0
  12. bitswan-0.0.0/README.md +74 -0
  13. bitswan-0.0.0/bspump/__init__.py +54 -0
  14. bitswan-0.0.0/bspump/__main__.py +4 -0
  15. bitswan-0.0.0/bspump/__version__.py +12 -0
  16. bitswan-0.0.0/bspump/abc/__init__.py +0 -0
  17. bitswan-0.0.0/bspump/abc/anomaly.py +41 -0
  18. bitswan-0.0.0/bspump/abc/connection.py +71 -0
  19. bitswan-0.0.0/bspump/abc/generator.py +82 -0
  20. bitswan-0.0.0/bspump/abc/lookup.py +307 -0
  21. bitswan-0.0.0/bspump/abc/lookupprovider.py +46 -0
  22. bitswan-0.0.0/bspump/abc/processor.py +136 -0
  23. bitswan-0.0.0/bspump/abc/sink.py +13 -0
  24. bitswan-0.0.0/bspump/abc/source.py +356 -0
  25. bitswan-0.0.0/bspump/aggregation/__init__.py +5 -0
  26. bitswan-0.0.0/bspump/aggregation/hyperloglog.py +125 -0
  27. bitswan-0.0.0/bspump/aio/__init__.py +6 -0
  28. bitswan-0.0.0/bspump/aio/sink.py +70 -0
  29. bitswan-0.0.0/bspump/amqp/__init__.py +10 -0
  30. bitswan-0.0.0/bspump/amqp/connection.py +73 -0
  31. bitswan-0.0.0/bspump/amqp/sink.py +79 -0
  32. bitswan-0.0.0/bspump/amqp/source.py +144 -0
  33. bitswan-0.0.0/bspump/analyzer/__init__.py +20 -0
  34. bitswan-0.0.0/bspump/analyzer/analyzer.py +112 -0
  35. bitswan-0.0.0/bspump/analyzer/analyzingsource.py +49 -0
  36. bitswan-0.0.0/bspump/analyzer/geoanalyzer.py +98 -0
  37. bitswan-0.0.0/bspump/analyzer/latch.py +117 -0
  38. bitswan-0.0.0/bspump/analyzer/sessionanalyzer.py +102 -0
  39. bitswan-0.0.0/bspump/analyzer/threshold.py +208 -0
  40. bitswan-0.0.0/bspump/analyzer/timedriftanalyzer.py +164 -0
  41. bitswan-0.0.0/bspump/analyzer/timewindowanalyzer.py +83 -0
  42. bitswan-0.0.0/bspump/anomaly/__init__.py +12 -0
  43. bitswan-0.0.0/bspump/anomaly/analyzer.py +100 -0
  44. bitswan-0.0.0/bspump/anomaly/generalanomaly.py +57 -0
  45. bitswan-0.0.0/bspump/anomaly/manager.py +117 -0
  46. bitswan-0.0.0/bspump/anomaly/storage.py +219 -0
  47. bitswan-0.0.0/bspump/application.py +158 -0
  48. bitswan-0.0.0/bspump/asab/__init__.py +50 -0
  49. bitswan-0.0.0/bspump/asab/__version__.py +12 -0
  50. bitswan-0.0.0/bspump/asab/abc/__init__.py +9 -0
  51. bitswan-0.0.0/bspump/asab/abc/module.py +75 -0
  52. bitswan-0.0.0/bspump/asab/abc/service.py +81 -0
  53. bitswan-0.0.0/bspump/asab/abc/singleton.py +24 -0
  54. bitswan-0.0.0/bspump/asab/alert.py +258 -0
  55. bitswan-0.0.0/bspump/asab/api/__init__.py +5 -0
  56. bitswan-0.0.0/bspump/asab/api/discovery.py +179 -0
  57. bitswan-0.0.0/bspump/asab/api/doc.py +366 -0
  58. bitswan-0.0.0/bspump/asab/api/doc_templates.py +109 -0
  59. bitswan-0.0.0/bspump/asab/api/log.py +161 -0
  60. bitswan-0.0.0/bspump/asab/api/service.py +235 -0
  61. bitswan-0.0.0/bspump/asab/api/web_handler.py +127 -0
  62. bitswan-0.0.0/bspump/asab/application.py +869 -0
  63. bitswan-0.0.0/bspump/asab/config.py +566 -0
  64. bitswan-0.0.0/bspump/asab/exceptions.py +54 -0
  65. bitswan-0.0.0/bspump/asab/library/__init__.py +16 -0
  66. bitswan-0.0.0/bspump/asab/library/dirsync.py +63 -0
  67. bitswan-0.0.0/bspump/asab/library/item.py +23 -0
  68. bitswan-0.0.0/bspump/asab/library/providers/__init__.py +0 -0
  69. bitswan-0.0.0/bspump/asab/library/providers/abc.py +49 -0
  70. bitswan-0.0.0/bspump/asab/library/providers/azurestorage.py +256 -0
  71. bitswan-0.0.0/bspump/asab/library/providers/filesystem.py +221 -0
  72. bitswan-0.0.0/bspump/asab/library/providers/filesystem_inotify.py +53 -0
  73. bitswan-0.0.0/bspump/asab/library/providers/git.py +217 -0
  74. bitswan-0.0.0/bspump/asab/library/providers/libsreg.py +176 -0
  75. bitswan-0.0.0/bspump/asab/library/providers/zookeeper.py +366 -0
  76. bitswan-0.0.0/bspump/asab/library/service.py +496 -0
  77. bitswan-0.0.0/bspump/asab/log.py +617 -0
  78. bitswan-0.0.0/bspump/asab/metrics/__init__.py +43 -0
  79. bitswan-0.0.0/bspump/asab/metrics/http.py +29 -0
  80. bitswan-0.0.0/bspump/asab/metrics/influxdb.py +308 -0
  81. bitswan-0.0.0/bspump/asab/metrics/metrics.py +606 -0
  82. bitswan-0.0.0/bspump/asab/metrics/native.py +66 -0
  83. bitswan-0.0.0/bspump/asab/metrics/openmetric.py +165 -0
  84. bitswan-0.0.0/bspump/asab/metrics/service.py +411 -0
  85. bitswan-0.0.0/bspump/asab/metrics/storage.py +48 -0
  86. bitswan-0.0.0/bspump/asab/metrics/web_handler.py +292 -0
  87. bitswan-0.0.0/bspump/asab/pdict.py +93 -0
  88. bitswan-0.0.0/bspump/asab/proactor/__init__.py +32 -0
  89. bitswan-0.0.0/bspump/asab/proactor/service.py +47 -0
  90. bitswan-0.0.0/bspump/asab/pubsub.py +357 -0
  91. bitswan-0.0.0/bspump/asab/sentry/__init__.py +15 -0
  92. bitswan-0.0.0/bspump/asab/sentry/service.py +300 -0
  93. bitswan-0.0.0/bspump/asab/socket.py +38 -0
  94. bitswan-0.0.0/bspump/asab/storage/__init__.py +39 -0
  95. bitswan-0.0.0/bspump/asab/storage/elasticsearch.py +621 -0
  96. bitswan-0.0.0/bspump/asab/storage/exceptions.py +9 -0
  97. bitswan-0.0.0/bspump/asab/storage/inmemory.py +151 -0
  98. bitswan-0.0.0/bspump/asab/storage/mongodb.py +211 -0
  99. bitswan-0.0.0/bspump/asab/storage/service.py +233 -0
  100. bitswan-0.0.0/bspump/asab/storage/upsertor.py +177 -0
  101. bitswan-0.0.0/bspump/asab/task.py +142 -0
  102. bitswan-0.0.0/bspump/asab/timer.py +97 -0
  103. bitswan-0.0.0/bspump/asab/tls.py +104 -0
  104. bitswan-0.0.0/bspump/asab/utils.py +205 -0
  105. bitswan-0.0.0/bspump/asab/web/__init__.py +63 -0
  106. bitswan-0.0.0/bspump/asab/web/accesslog.py +54 -0
  107. bitswan-0.0.0/bspump/asab/web/auth/__init__.py +8 -0
  108. bitswan-0.0.0/bspump/asab/web/auth/decorator.py +82 -0
  109. bitswan-0.0.0/bspump/asab/web/auth/service.py +607 -0
  110. bitswan-0.0.0/bspump/asab/web/authz/__init__.py +12 -0
  111. bitswan-0.0.0/bspump/asab/web/authz/decorator.py +118 -0
  112. bitswan-0.0.0/bspump/asab/web/authz/middleware.py +19 -0
  113. bitswan-0.0.0/bspump/asab/web/authz/service.py +228 -0
  114. bitswan-0.0.0/bspump/asab/web/container.py +238 -0
  115. bitswan-0.0.0/bspump/asab/web/metrics.py +51 -0
  116. bitswan-0.0.0/bspump/asab/web/rest/__init__.py +8 -0
  117. bitswan-0.0.0/bspump/asab/web/rest/json.py +329 -0
  118. bitswan-0.0.0/bspump/asab/web/service.py +88 -0
  119. bitswan-0.0.0/bspump/asab/web/session/__init__.py +54 -0
  120. bitswan-0.0.0/bspump/asab/web/session/cookies.py +37 -0
  121. bitswan-0.0.0/bspump/asab/web/session/inmemstor.py +60 -0
  122. bitswan-0.0.0/bspump/asab/web/session/session.py +81 -0
  123. bitswan-0.0.0/bspump/asab/web/session/storage.py +40 -0
  124. bitswan-0.0.0/bspump/asab/web/staticdir.py +33 -0
  125. bitswan-0.0.0/bspump/asab/web/tenant/__init__.py +9 -0
  126. bitswan-0.0.0/bspump/asab/web/tenant/midleware.py +44 -0
  127. bitswan-0.0.0/bspump/asab/web/tenant/service.py +93 -0
  128. bitswan-0.0.0/bspump/asab/web/tenant/web.py +13 -0
  129. bitswan-0.0.0/bspump/asab/web/webcrypto.py +103 -0
  130. bitswan-0.0.0/bspump/asab/web/websocket.py +156 -0
  131. bitswan-0.0.0/bspump/asab/zookeeper/__init__.py +17 -0
  132. bitswan-0.0.0/bspump/asab/zookeeper/container.py +259 -0
  133. bitswan-0.0.0/bspump/asab/zookeeper/service.py +28 -0
  134. bitswan-0.0.0/bspump/asab/zookeeper/wrapper.py +110 -0
  135. bitswan-0.0.0/bspump/avro/__init__.py +11 -0
  136. bitswan-0.0.0/bspump/avro/deserializer.py +34 -0
  137. bitswan-0.0.0/bspump/avro/loader.py +28 -0
  138. bitswan-0.0.0/bspump/avro/serializer.py +56 -0
  139. bitswan-0.0.0/bspump/avro/sink.py +140 -0
  140. bitswan-0.0.0/bspump/avro/source.py +34 -0
  141. bitswan-0.0.0/bspump/cache/__init__.py +7 -0
  142. bitswan-0.0.0/bspump/cache/cachedict.py +2 -0
  143. bitswan-0.0.0/bspump/cache/lrucachedict.py +58 -0
  144. bitswan-0.0.0/bspump/common/__init__.py +80 -0
  145. bitswan-0.0.0/bspump/common/aggregator.py +339 -0
  146. bitswan-0.0.0/bspump/common/bytes.py +74 -0
  147. bitswan-0.0.0/bspump/common/flatten.py +100 -0
  148. bitswan-0.0.0/bspump/common/hexlify.py +23 -0
  149. bitswan-0.0.0/bspump/common/iterator.py +57 -0
  150. bitswan-0.0.0/bspump/common/jq.py +77 -0
  151. bitswan-0.0.0/bspump/common/json.py +78 -0
  152. bitswan-0.0.0/bspump/common/jsonbytes.py +27 -0
  153. bitswan-0.0.0/bspump/common/mapping.py +119 -0
  154. bitswan-0.0.0/bspump/common/null.py +19 -0
  155. bitswan-0.0.0/bspump/common/print.py +182 -0
  156. bitswan-0.0.0/bspump/common/routing.py +404 -0
  157. bitswan-0.0.0/bspump/common/tee.py +161 -0
  158. bitswan-0.0.0/bspump/common/time.py +57 -0
  159. bitswan-0.0.0/bspump/common/transfr.py +61 -0
  160. bitswan-0.0.0/bspump/crypto/__init__.py +17 -0
  161. bitswan-0.0.0/bspump/crypto/aes.py +47 -0
  162. bitswan-0.0.0/bspump/crypto/hashing.py +73 -0
  163. bitswan-0.0.0/bspump/declarative/__init__.py +39 -0
  164. bitswan-0.0.0/bspump/declarative/abc.py +154 -0
  165. bitswan-0.0.0/bspump/declarative/builder.py +334 -0
  166. bitswan-0.0.0/bspump/declarative/declerror.py +16 -0
  167. bitswan-0.0.0/bspump/declarative/dot.py +68 -0
  168. bitswan-0.0.0/bspump/declarative/expression/__init__.py +157 -0
  169. bitswan-0.0.0/bspump/declarative/expression/arithmetic.py +214 -0
  170. bitswan-0.0.0/bspump/declarative/expression/comparison.py +264 -0
  171. bitswan-0.0.0/bspump/declarative/expression/datastructs/__init__.py +0 -0
  172. bitswan-0.0.0/bspump/declarative/expression/datastructs/dict_parse.py +122 -0
  173. bitswan-0.0.0/bspump/declarative/expression/datastructs/dictexpr.py +208 -0
  174. bitswan-0.0.0/bspump/declarative/expression/datastructs/itemexpr.py +212 -0
  175. bitswan-0.0.0/bspump/declarative/expression/datastructs/listexpr.py +31 -0
  176. bitswan-0.0.0/bspump/declarative/expression/datastructs/tupleexpr.py +12 -0
  177. bitswan-0.0.0/bspump/declarative/expression/datetime/__init__.py +0 -0
  178. bitswan-0.0.0/bspump/declarative/expression/datetime/dtformat.py +53 -0
  179. bitswan-0.0.0/bspump/declarative/expression/datetime/dtget.py +72 -0
  180. bitswan-0.0.0/bspump/declarative/expression/datetime/dtparse.py +80 -0
  181. bitswan-0.0.0/bspump/declarative/expression/datetime/nowexpr.py +33 -0
  182. bitswan-0.0.0/bspump/declarative/expression/ip/__init__.py +0 -0
  183. bitswan-0.0.0/bspump/declarative/expression/ip/insubnetexpr.py +50 -0
  184. bitswan-0.0.0/bspump/declarative/expression/ip/ipformatexpr.py +42 -0
  185. bitswan-0.0.0/bspump/declarative/expression/ip/ipparseexpr.py +32 -0
  186. bitswan-0.0.0/bspump/declarative/expression/logical.py +89 -0
  187. bitswan-0.0.0/bspump/declarative/expression/lookup/__init__.py +0 -0
  188. bitswan-0.0.0/bspump/declarative/expression/lookup/lookupexpr.py +48 -0
  189. bitswan-0.0.0/bspump/declarative/expression/statement/__init__.py +0 -0
  190. bitswan-0.0.0/bspump/declarative/expression/statement/firstexpr.py +11 -0
  191. bitswan-0.0.0/bspump/declarative/expression/statement/forexpr.py +21 -0
  192. bitswan-0.0.0/bspump/declarative/expression/statement/funexpr.py +30 -0
  193. bitswan-0.0.0/bspump/declarative/expression/statement/ifexpr.py +52 -0
  194. bitswan-0.0.0/bspump/declarative/expression/statement/selfexpr.py +31 -0
  195. bitswan-0.0.0/bspump/declarative/expression/statement/whenexpr.py +109 -0
  196. bitswan-0.0.0/bspump/declarative/expression/string/__init__.py +0 -0
  197. bitswan-0.0.0/bspump/declarative/expression/string/contains.py +34 -0
  198. bitswan-0.0.0/bspump/declarative/expression/string/cutexpr.py +51 -0
  199. bitswan-0.0.0/bspump/declarative/expression/string/endswith.py +34 -0
  200. bitswan-0.0.0/bspump/declarative/expression/string/joinexpr.py +78 -0
  201. bitswan-0.0.0/bspump/declarative/expression/string/lowerexpr.py +25 -0
  202. bitswan-0.0.0/bspump/declarative/expression/string/regex.py +270 -0
  203. bitswan-0.0.0/bspump/declarative/expression/string/split.py +41 -0
  204. bitswan-0.0.0/bspump/declarative/expression/string/startswith.py +38 -0
  205. bitswan-0.0.0/bspump/declarative/expression/string/substringexpr.py +48 -0
  206. bitswan-0.0.0/bspump/declarative/expression/string/upperexpr.py +25 -0
  207. bitswan-0.0.0/bspump/declarative/expression/test/__init__.py +0 -0
  208. bitswan-0.0.0/bspump/declarative/expression/test/inexpr.py +112 -0
  209. bitswan-0.0.0/bspump/declarative/expression/utility/__init__.py +0 -0
  210. bitswan-0.0.0/bspump/declarative/expression/utility/castexpr.py +90 -0
  211. bitswan-0.0.0/bspump/declarative/expression/utility/context.py +80 -0
  212. bitswan-0.0.0/bspump/declarative/expression/utility/debugexpr.py +25 -0
  213. bitswan-0.0.0/bspump/declarative/expression/utility/hashexpr.py +92 -0
  214. bitswan-0.0.0/bspump/declarative/expression/utility/mapexpr.py +66 -0
  215. bitswan-0.0.0/bspump/declarative/expression/value/__init__.py +0 -0
  216. bitswan-0.0.0/bspump/declarative/expression/value/eventexpr.py +94 -0
  217. bitswan-0.0.0/bspump/declarative/expression/value/valueexpr.py +27 -0
  218. bitswan-0.0.0/bspump/declarative/generator.py +51 -0
  219. bitswan-0.0.0/bspump/declarative/optimizer.py +65 -0
  220. bitswan-0.0.0/bspump/declarative/processor.py +34 -0
  221. bitswan-0.0.0/bspump/declarative/segmentbuilder.py +159 -0
  222. bitswan-0.0.0/bspump/declarative/timewindowanalyzer.py +115 -0
  223. bitswan-0.0.0/bspump/elasticsearch/__init__.py +12 -0
  224. bitswan-0.0.0/bspump/elasticsearch/connection.py +560 -0
  225. bitswan-0.0.0/bspump/elasticsearch/data_feeder.py +107 -0
  226. bitswan-0.0.0/bspump/elasticsearch/lookup.py +307 -0
  227. bitswan-0.0.0/bspump/elasticsearch/sink.py +153 -0
  228. bitswan-0.0.0/bspump/elasticsearch/source.py +241 -0
  229. bitswan-0.0.0/bspump/exception.py +6 -0
  230. bitswan-0.0.0/bspump/file/__init__.py +19 -0
  231. bitswan-0.0.0/bspump/file/fileabcsource.py +384 -0
  232. bitswan-0.0.0/bspump/file/fileblocksink.py +93 -0
  233. bitswan-0.0.0/bspump/file/fileblocksource.py +59 -0
  234. bitswan-0.0.0/bspump/file/filecsvsink.py +146 -0
  235. bitswan-0.0.0/bspump/file/filecsvsource.py +103 -0
  236. bitswan-0.0.0/bspump/file/filejsonsource.py +52 -0
  237. bitswan-0.0.0/bspump/file/filelinesource.py +133 -0
  238. bitswan-0.0.0/bspump/file/globscan.py +127 -0
  239. bitswan-0.0.0/bspump/file/lookupprovider.py +75 -0
  240. bitswan-0.0.0/bspump/fileloader.py +25 -0
  241. bitswan-0.0.0/bspump/filter/__init__.py +9 -0
  242. bitswan-0.0.0/bspump/filter/attributefilter.py +49 -0
  243. bitswan-0.0.0/bspump/filter/contentfilter.py +64 -0
  244. bitswan-0.0.0/bspump/filter/timedriftfilter.py +53 -0
  245. bitswan-0.0.0/bspump/ftp/__init__.py +7 -0
  246. bitswan-0.0.0/bspump/ftp/connection.py +59 -0
  247. bitswan-0.0.0/bspump/ftp/source.py +132 -0
  248. bitswan-0.0.0/bspump/googledrive/__init__.py +10 -0
  249. bitswan-0.0.0/bspump/googledrive/abcsink.py +72 -0
  250. bitswan-0.0.0/bspump/googledrive/blocksink.py +61 -0
  251. bitswan-0.0.0/bspump/googledrive/connection.py +70 -0
  252. bitswan-0.0.0/bspump/http/__init__.py +19 -0
  253. bitswan-0.0.0/bspump/http/client/__init__.py +0 -0
  254. bitswan-0.0.0/bspump/http/client/abcsource.py +100 -0
  255. bitswan-0.0.0/bspump/http/client/source.py +32 -0
  256. bitswan-0.0.0/bspump/http/client/wssink.py +130 -0
  257. bitswan-0.0.0/bspump/http/lookupprovider.py +152 -0
  258. bitswan-0.0.0/bspump/http/web/__init__.py +0 -0
  259. bitswan-0.0.0/bspump/http/web/components/__init__.py +29 -0
  260. bitswan-0.0.0/bspump/http/web/components/base_field.py +23 -0
  261. bitswan-0.0.0/bspump/http/web/components/button.py +24 -0
  262. bitswan-0.0.0/bspump/http/web/components/checkbox_field.py +26 -0
  263. bitswan-0.0.0/bspump/http/web/components/choice_field.py +17 -0
  264. bitswan-0.0.0/bspump/http/web/components/date_field.py +27 -0
  265. bitswan-0.0.0/bspump/http/web/components/datetime_field.py +26 -0
  266. bitswan-0.0.0/bspump/http/web/components/field.py +60 -0
  267. bitswan-0.0.0/bspump/http/web/components/field_set.py +48 -0
  268. bitswan-0.0.0/bspump/http/web/components/file_field.py +31 -0
  269. bitswan-0.0.0/bspump/http/web/components/float_field.py +21 -0
  270. bitswan-0.0.0/bspump/http/web/components/int_field.py +21 -0
  271. bitswan-0.0.0/bspump/http/web/components/raw_json.py +19 -0
  272. bitswan-0.0.0/bspump/http/web/components/text_field.py +12 -0
  273. bitswan-0.0.0/bspump/http/web/server.py +584 -0
  274. bitswan-0.0.0/bspump/http/web/sink.py +93 -0
  275. bitswan-0.0.0/bspump/http/web/source.py +137 -0
  276. bitswan-0.0.0/bspump/http/web/template_env.py +21 -0
  277. bitswan-0.0.0/bspump/http/web/templates/button.html +5 -0
  278. bitswan-0.0.0/bspump/http/web/templates/checkbox-field.html +5 -0
  279. bitswan-0.0.0/bspump/http/web/templates/choice-field.html +7 -0
  280. bitswan-0.0.0/bspump/http/web/templates/date-field.html +9 -0
  281. bitswan-0.0.0/bspump/http/web/templates/datetime-field.html +9 -0
  282. bitswan-0.0.0/bspump/http/web/templates/field.html +6 -0
  283. bitswan-0.0.0/bspump/http/web/templates/fieldset.html +9 -0
  284. bitswan-0.0.0/bspump/http/web/templates/file-field.html +3 -0
  285. bitswan-0.0.0/bspump/http/web/templates/list.html +6 -0
  286. bitswan-0.0.0/bspump/http/web/templates/nested-json.html +6 -0
  287. bitswan-0.0.0/bspump/http/web/templates/number-field.html +3 -0
  288. bitswan-0.0.0/bspump/http/web/templates/output-form.html +26 -0
  289. bitswan-0.0.0/bspump/http/web/templates/raw-json-field.html +3 -0
  290. bitswan-0.0.0/bspump/http/web/templates/source-form.html +66 -0
  291. bitswan-0.0.0/bspump/http/web/templates/text-field.html +6 -0
  292. bitswan-0.0.0/bspump/http/web/wssource.py +57 -0
  293. bitswan-0.0.0/bspump/influxdb/__init__.py +7 -0
  294. bitswan-0.0.0/bspump/influxdb/connection.py +218 -0
  295. bitswan-0.0.0/bspump/influxdb/sink.py +99 -0
  296. bitswan-0.0.0/bspump/integrity/__init__.py +5 -0
  297. bitswan-0.0.0/bspump/integrity/integrityenricher.py +77 -0
  298. bitswan-0.0.0/bspump/ipc/__init__.py +19 -0
  299. bitswan-0.0.0/bspump/ipc/datagram.py +171 -0
  300. bitswan-0.0.0/bspump/ipc/protocol.py +115 -0
  301. bitswan-0.0.0/bspump/ipc/stream.py +166 -0
  302. bitswan-0.0.0/bspump/ipc/stream_client_sink.py +195 -0
  303. bitswan-0.0.0/bspump/ipc/stream_server_source.py +228 -0
  304. bitswan-0.0.0/bspump/jupyter/__init__.py +49 -0
  305. bitswan-0.0.0/bspump/jupyter/jupyter.py +651 -0
  306. bitswan-0.0.0/bspump/kafka/__init__.py +13 -0
  307. bitswan-0.0.0/bspump/kafka/batchsink.py +113 -0
  308. bitswan-0.0.0/bspump/kafka/connection.py +36 -0
  309. bitswan-0.0.0/bspump/kafka/keyfilter.py +53 -0
  310. bitswan-0.0.0/bspump/kafka/sink.py +128 -0
  311. bitswan-0.0.0/bspump/kafka/source.py +181 -0
  312. bitswan-0.0.0/bspump/kafka/topic_initializer.py +324 -0
  313. bitswan-0.0.0/bspump/ldap/__init__.py +7 -0
  314. bitswan-0.0.0/bspump/ldap/connection.py +110 -0
  315. bitswan-0.0.0/bspump/ldap/source.py +94 -0
  316. bitswan-0.0.0/bspump/lookup/__init__.py +12 -0
  317. bitswan-0.0.0/bspump/lookup/index.py +312 -0
  318. bitswan-0.0.0/bspump/lookup/ipgeolookup.py +155 -0
  319. bitswan-0.0.0/bspump/lookup/matrixlookup.py +110 -0
  320. bitswan-0.0.0/bspump/lookup/memcachedlookup.py +51 -0
  321. bitswan-0.0.0/bspump/mail/__init__.py +8 -0
  322. bitswan-0.0.0/bspump/mail/smtpconnection.py +111 -0
  323. bitswan-0.0.0/bspump/mail/smtpsink.py +25 -0
  324. bitswan-0.0.0/bspump/main.py +132 -0
  325. bitswan-0.0.0/bspump/matrix/__init__.py +26 -0
  326. bitswan-0.0.0/bspump/matrix/geomatrix.py +260 -0
  327. bitswan-0.0.0/bspump/matrix/matrix.py +247 -0
  328. bitswan-0.0.0/bspump/matrix/matrixexportcsvgenerator.py +70 -0
  329. bitswan-0.0.0/bspump/matrix/namedmatrix.py +165 -0
  330. bitswan-0.0.0/bspump/matrix/sessionmatrix.py +106 -0
  331. bitswan-0.0.0/bspump/matrix/source.py +19 -0
  332. bitswan-0.0.0/bspump/matrix/timewindowmatrix.py +482 -0
  333. bitswan-0.0.0/bspump/matrix/utils/__init__.py +16 -0
  334. bitswan-0.0.0/bspump/matrix/utils/closedrows.py +87 -0
  335. bitswan-0.0.0/bspump/matrix/utils/index.py +109 -0
  336. bitswan-0.0.0/bspump/matrix/utils/timeconfig.py +56 -0
  337. bitswan-0.0.0/bspump/matrix/utils/warmingupcount.py +60 -0
  338. bitswan-0.0.0/bspump/model/__init__.py +3 -0
  339. bitswan-0.0.0/bspump/model/model.py +61 -0
  340. bitswan-0.0.0/bspump/mongodb/__init__.py +13 -0
  341. bitswan-0.0.0/bspump/mongodb/changestreamsource.py +75 -0
  342. bitswan-0.0.0/bspump/mongodb/connection.py +95 -0
  343. bitswan-0.0.0/bspump/mongodb/lookup.py +212 -0
  344. bitswan-0.0.0/bspump/mongodb/sink.py +118 -0
  345. bitswan-0.0.0/bspump/mongodb/source.py +67 -0
  346. bitswan-0.0.0/bspump/mqtt/__init__.py +6 -0
  347. bitswan-0.0.0/bspump/mqtt/connection.py +70 -0
  348. bitswan-0.0.0/bspump/mqtt/service.py +221 -0
  349. bitswan-0.0.0/bspump/mqtt/sink.py +19 -0
  350. bitswan-0.0.0/bspump/mqtt/source.py +35 -0
  351. bitswan-0.0.0/bspump/mysql/__init__.py +12 -0
  352. bitswan-0.0.0/bspump/mysql/binlogsource.py +244 -0
  353. bitswan-0.0.0/bspump/mysql/connection.py +356 -0
  354. bitswan-0.0.0/bspump/mysql/convertors.py +32 -0
  355. bitswan-0.0.0/bspump/mysql/lookup.py +180 -0
  356. bitswan-0.0.0/bspump/mysql/sink.py +36 -0
  357. bitswan-0.0.0/bspump/mysql/source.py +56 -0
  358. bitswan-0.0.0/bspump/odbc/__init__.py +9 -0
  359. bitswan-0.0.0/bspump/odbc/connection.py +174 -0
  360. bitswan-0.0.0/bspump/odbc/sink.py +36 -0
  361. bitswan-0.0.0/bspump/odbc/source.py +36 -0
  362. bitswan-0.0.0/bspump/parquet/__init__.py +3 -0
  363. bitswan-0.0.0/bspump/parquet/sink.py +264 -0
  364. bitswan-0.0.0/bspump/pipeline.py +1033 -0
  365. bitswan-0.0.0/bspump/postgresql/__init__.py +13 -0
  366. bitswan-0.0.0/bspump/postgresql/connection.py +292 -0
  367. bitswan-0.0.0/bspump/postgresql/logicalreplicationsource.py +113 -0
  368. bitswan-0.0.0/bspump/postgresql/lookup.py +182 -0
  369. bitswan-0.0.0/bspump/postgresql/sink.py +36 -0
  370. bitswan-0.0.0/bspump/postgresql/source.py +52 -0
  371. bitswan-0.0.0/bspump/pumpbuilder.py +274 -0
  372. bitswan-0.0.0/bspump/random/__init__.py +10 -0
  373. bitswan-0.0.0/bspump/random/randomdrop.py +21 -0
  374. bitswan-0.0.0/bspump/random/randomenricher.py +41 -0
  375. bitswan-0.0.0/bspump/random/source.py +71 -0
  376. bitswan-0.0.0/bspump/service.py +374 -0
  377. bitswan-0.0.0/bspump/slack/__init__.py +10 -0
  378. bitswan-0.0.0/bspump/slack/connection.py +75 -0
  379. bitswan-0.0.0/bspump/slack/sink.py +57 -0
  380. bitswan-0.0.0/bspump/socket/__init__.py +15 -0
  381. bitswan-0.0.0/bspump/ssh/__init__.py +7 -0
  382. bitswan-0.0.0/bspump/ssh/connection.py +104 -0
  383. bitswan-0.0.0/bspump/ssh/sink.py +158 -0
  384. bitswan-0.0.0/bspump/styles/input.css +3 -0
  385. bitswan-0.0.0/bspump/styles/tailwind.css +1120 -0
  386. bitswan-0.0.0/bspump/subprocess/__init__.py +3 -0
  387. bitswan-0.0.0/bspump/subprocess/source.py +57 -0
  388. bitswan-0.0.0/bspump/test/__init__.py +9 -0
  389. bitswan-0.0.0/bspump/test/test.py +108 -0
  390. bitswan-0.0.0/bspump/test-data/globscan/1 +1 -0
  391. bitswan-0.0.0/bspump/test-data/globscan/2 +1 -0
  392. bitswan-0.0.0/bspump/test-data/globscan/3 +1 -0
  393. bitswan-0.0.0/bspump/test-data/globscan/4-locked +1 -0
  394. bitswan-0.0.0/bspump/test-data/globscan/5-failed +1 -0
  395. bitswan-0.0.0/bspump/test-data/globscan/6-processed +1 -0
  396. bitswan-0.0.0/bspump/timeseries/__init__.py +3 -0
  397. bitswan-0.0.0/bspump/timeseries/analyzer.py +92 -0
  398. bitswan-0.0.0/bspump/trigger/__init__.py +15 -0
  399. bitswan-0.0.0/bspump/trigger/crontrig.py +55 -0
  400. bitswan-0.0.0/bspump/trigger/opportunistic.py +44 -0
  401. bitswan-0.0.0/bspump/trigger/periodic.py +31 -0
  402. bitswan-0.0.0/bspump/trigger/pubsub.py +22 -0
  403. bitswan-0.0.0/bspump/trigger/runonce.py +21 -0
  404. bitswan-0.0.0/bspump/trigger/trigger.py +61 -0
  405. bitswan-0.0.0/bspump/unittest/__init__.py +13 -0
  406. bitswan-0.0.0/bspump/unittest/pipeline.py +39 -0
  407. bitswan-0.0.0/bspump/unittest/sink.py +10 -0
  408. bitswan-0.0.0/bspump/unittest/source.py +18 -0
  409. bitswan-0.0.0/bspump/unittest/unit_test_case.py +84 -0
  410. bitswan-0.0.0/bspump/watch.py +51 -0
  411. bitswan-0.0.0/bspump/web/__init__.py +155 -0
  412. bitswan-0.0.0/bspump/web/static/app.html +67 -0
  413. bitswan-0.0.0/bspump/web/static/app.js +8 -0
  414. bitswan-0.0.0/bspump/zookeeper/__init__.py +3 -0
  415. bitswan-0.0.0/bspump/zookeeper/lookupprovider.py +36 -0
  416. bitswan-0.0.0/build_and_push.sh +17 -0
  417. bitswan-0.0.0/doc/.readthedocs.yml +22 -0
  418. bitswan-0.0.0/doc/mqtt-metrics-and-visibility.md +40 -0
  419. bitswan-0.0.0/doc/opsgenie.md +21 -0
  420. bitswan-0.0.0/doc/secrets.md +48 -0
  421. bitswan-0.0.0/docserver/Caddyfile +4 -0
  422. bitswan-0.0.0/docserver/Dockerfile +26 -0
  423. bitswan-0.0.0/docserver/build_and_push.sh +19 -0
  424. bitswan-0.0.0/examples/.bitswan-ignore +0 -0
  425. bitswan-0.0.0/examples/AutoPipeline/main.ipynb +229 -0
  426. bitswan-0.0.0/examples/AutoPipeline/pipelines.conf +8 -0
  427. bitswan-0.0.0/examples/FileField/main.ipynb +146 -0
  428. bitswan-0.0.0/examples/FileField/pipelines.conf +4 -0
  429. bitswan-0.0.0/examples/JWTWebForm/main.ipynb +100 -0
  430. bitswan-0.0.0/examples/JWTWebForm/pipelines.conf +8 -0
  431. bitswan-0.0.0/examples/Kafka2Kafka/main.ipynb +155 -0
  432. bitswan-0.0.0/examples/Kafka2Kafka/pipelines.conf +12 -0
  433. bitswan-0.0.0/examples/MemeGenerator/Dockerfile +2 -0
  434. bitswan-0.0.0/examples/MemeGenerator/image.jpg +0 -0
  435. bitswan-0.0.0/examples/MemeGenerator/main.ipynb +190 -0
  436. bitswan-0.0.0/examples/MemeGenerator/pipelines.conf +3 -0
  437. bitswan-0.0.0/examples/NestedJsonOutput/main.ipynb +171 -0
  438. bitswan-0.0.0/examples/NestedJsonOutput/pipelines.conf +4 -0
  439. bitswan-0.0.0/examples/ProtectedWebForm/main.ipynb +97 -0
  440. bitswan-0.0.0/examples/ProtectedWebForm/pipelines.conf +7 -0
  441. bitswan-0.0.0/examples/ProtectedWebRouteSource/main.ipynb +62 -0
  442. bitswan-0.0.0/examples/ProtectedWebRouteSource/pipelines.conf +2 -0
  443. bitswan-0.0.0/examples/Secrets/example-secrets-dir/bar +1 -0
  444. bitswan-0.0.0/examples/Secrets/example-secrets-dir/baz +1 -0
  445. bitswan-0.0.0/examples/Secrets/example-secrets-dir/foo +1 -0
  446. bitswan-0.0.0/examples/Secrets/main.ipynb +95 -0
  447. bitswan-0.0.0/examples/Secrets/pipelines.conf +2 -0
  448. bitswan-0.0.0/examples/StocksCalculator/main.ipynb +471 -0
  449. bitswan-0.0.0/examples/StocksCalculator/pipelines.conf +4 -0
  450. bitswan-0.0.0/examples/Testing/AutoPipeline/main.ipynb +132 -0
  451. bitswan-0.0.0/examples/Testing/AutoPipeline/pipelines.conf +8 -0
  452. bitswan-0.0.0/examples/Testing/ExpectError/main.ipynb +354 -0
  453. bitswan-0.0.0/examples/Testing/ExpectError/pipelines.conf +8 -0
  454. bitswan-0.0.0/examples/Testing/InspectError/main.ipynb +354 -0
  455. bitswan-0.0.0/examples/Testing/InspectError/pipelines.conf +8 -0
  456. bitswan-0.0.0/examples/Testing/MultiplePipelines/main.ipynb +354 -0
  457. bitswan-0.0.0/examples/Testing/MultiplePipelines/pipelines.conf +8 -0
  458. bitswan-0.0.0/examples/Testing/ProbeError/main.ipynb +354 -0
  459. bitswan-0.0.0/examples/Testing/ProbeError/pipelines.conf +8 -0
  460. bitswan-0.0.0/examples/Testing/main.ipynb +285 -0
  461. bitswan-0.0.0/examples/Testing/pipelines.conf +8 -0
  462. bitswan-0.0.0/examples/WebForms/main.ipynb +194 -0
  463. bitswan-0.0.0/examples/WebForms/pipelines.conf +3 -0
  464. bitswan-0.0.0/examples/WebFormsButton/main.ipynb +100 -0
  465. bitswan-0.0.0/examples/WebFormsButton/scripts/download_pdf.js +57 -0
  466. bitswan-0.0.0/examples/WebFormsButton/scripts/test_report.js +28 -0
  467. bitswan-0.0.0/examples/WebHooks/main.ipynb +121 -0
  468. bitswan-0.0.0/examples/WebHooks/pipelines.conf +16 -0
  469. bitswan-0.0.0/examples/WebServer/main.ipynb +63 -0
  470. bitswan-0.0.0/examples/WebServer/pipelines.conf +4 -0
  471. bitswan-0.0.0/icons/bitswan-logo.svg +47 -0
  472. bitswan-0.0.0/perf/README.md +4 -0
  473. bitswan-0.0.0/perf/data/sample-for-avro-schema.avsc +10 -0
  474. bitswan-0.0.0/perf/data/sample-for-avro.csv +23 -0
  475. bitswan-0.0.0/perf/elasticsearch/README.md +18 -0
  476. bitswan-0.0.0/perf/elasticsearch/perf-baseline-sink.py +53 -0
  477. bitswan-0.0.0/perf/elasticsearch/perf-es-sink.py +57 -0
  478. bitswan-0.0.0/pre/entrypoint.sh +10 -0
  479. bitswan-0.0.0/pyproject.toml +94 -0
  480. bitswan-0.0.0/pytest.ini +3 -0
  481. bitswan-0.0.0/shell.nix +22 -0
  482. bitswan-0.0.0/tailwind.config.js +17 -0
  483. bitswan-0.0.0/test/__init__.py +11 -0
  484. bitswan-0.0.0/test/analyzer/__init__.py +6 -0
  485. bitswan-0.0.0/test/analyzer/test_analyzer.py +24 -0
  486. bitswan-0.0.0/test/analyzer/test_geoanalyzer.py +20 -0
  487. bitswan-0.0.0/test/analyzer/test_latch.py +94 -0
  488. bitswan-0.0.0/test/analyzer/test_sessionanalyzer.py +22 -0
  489. bitswan-0.0.0/test/analyzer/test_timedriftanalyzer.py +21 -0
  490. bitswan-0.0.0/test/analyzer/test_timewindowanalyzer.py +22 -0
  491. bitswan-0.0.0/test/common/__init__.py +14 -0
  492. bitswan-0.0.0/test/common/test_aggregator.py +112 -0
  493. bitswan-0.0.0/test/common/test_bytes.py +64 -0
  494. bitswan-0.0.0/test/common/test_flatten.py +43 -0
  495. bitswan-0.0.0/test/common/test_hexlify.py +20 -0
  496. bitswan-0.0.0/test/common/test_iterator.py +45 -0
  497. bitswan-0.0.0/test/common/test_json.py +63 -0
  498. bitswan-0.0.0/test/common/test_mapping.py +104 -0
  499. bitswan-0.0.0/test/common/test_null.py +15 -0
  500. bitswan-0.0.0/test/common/test_print.py +109 -0
  501. bitswan-0.0.0/test/common/test_time.py +38 -0
  502. bitswan-0.0.0/test/crypto/__init__.py +2 -0
  503. bitswan-0.0.0/test/crypto/test_aes.py +45 -0
  504. bitswan-0.0.0/test/crypto/test_hashing.py +198 -0
  505. bitswan-0.0.0/test/declarative/__init__.py +11 -0
  506. bitswan-0.0.0/test/declarative/test_add_01.yaml +4 -0
  507. bitswan-0.0.0/test/declarative/test_add_02.yaml +5 -0
  508. bitswan-0.0.0/test/declarative/test_and_01.yaml +8 -0
  509. bitswan-0.0.0/test/declarative/test_config_01.yaml +5 -0
  510. bitswan-0.0.0/test/declarative/test_datetime_add.yaml +6 -0
  511. bitswan-0.0.0/test/declarative/test_datetime_parse_fail.yaml +6 -0
  512. bitswan-0.0.0/test/declarative/test_datetime_parse_set_year.yaml +5 -0
  513. bitswan-0.0.0/test/declarative/test_datetime_parse_timezone.yaml +5 -0
  514. bitswan-0.0.0/test/declarative/test_datetime_parse_tz.yaml +4 -0
  515. bitswan-0.0.0/test/declarative/test_declarative_add.py +34 -0
  516. bitswan-0.0.0/test/declarative/test_declarative_and.py +20 -0
  517. bitswan-0.0.0/test/declarative/test_declarative_config.py +23 -0
  518. bitswan-0.0.0/test/declarative/test_declarative_datetime.py +56 -0
  519. bitswan-0.0.0/test/declarative/test_declarative_dict.py +53 -0
  520. bitswan-0.0.0/test/declarative/test_declarative_dict_parse.py +54 -0
  521. bitswan-0.0.0/test/declarative/test_declarative_join.py +37 -0
  522. bitswan-0.0.0/test/declarative/test_declarative_nested_expression.py +71 -0
  523. bitswan-0.0.0/test/declarative/test_declarative_nested_expression.yaml +36 -0
  524. bitswan-0.0.0/test/declarative/test_declarative_regex.py +59 -0
  525. bitswan-0.0.0/test/declarative/test_declarative_time.py +25 -0
  526. bitswan-0.0.0/test/declarative/test_declarative_when.py +35 -0
  527. bitswan-0.0.0/test/declarative/test_dict_01.yaml +6 -0
  528. bitswan-0.0.0/test/declarative/test_dict_02.yaml +6 -0
  529. bitswan-0.0.0/test/declarative/test_dict_parse_kvdqs_01.yaml +4 -0
  530. bitswan-0.0.0/test/declarative/test_dict_parse_kvs_01.yaml +4 -0
  531. bitswan-0.0.0/test/declarative/test_dict_parse_qs_01.yaml +4 -0
  532. bitswan-0.0.0/test/declarative/test_join_01.yaml +9 -0
  533. bitswan-0.0.0/test/declarative/test_join_02.yaml +10 -0
  534. bitswan-0.0.0/test/declarative/test_now.yaml +2 -0
  535. bitswan-0.0.0/test/declarative/test_regex_parse_01.yaml +22 -0
  536. bitswan-0.0.0/test/declarative/test_regex_parse_02.yaml +24 -0
  537. bitswan-0.0.0/test/declarative/test_when.yaml +34 -0
  538. bitswan-0.0.0/test/file/__init__.py +1 -0
  539. bitswan-0.0.0/test/file/test_fileblocksink.py +24 -0
  540. bitswan-0.0.0/test/filter/__init__.py +3 -0
  541. bitswan-0.0.0/test/filter/test_attributefilter.py +74 -0
  542. bitswan-0.0.0/test/filter/test_contentfilter.py +60 -0
  543. bitswan-0.0.0/test/filter/test_timedriftfilter.py +28 -0
  544. bitswan-0.0.0/test/influxdb/__init__.py +1 -0
  545. bitswan-0.0.0/test/influxdb/test_influxdbsink.py +42 -0
  546. bitswan-0.0.0/test/integrity/__init__.py +1 -0
  547. bitswan-0.0.0/test/integrity/test_integrity.py +53 -0
  548. bitswan-0.0.0/test/jupyter/__init__.py +1 -0
  549. bitswan-0.0.0/test/jupyter/expected.py +40 -0
  550. bitswan-0.0.0/test/jupyter/parse_example.ipynb +135 -0
  551. bitswan-0.0.0/test/jupyter/test_jupyter.py +28 -0
  552. bitswan-0.0.0/test/kafka/__init__.py +1 -0
  553. bitswan-0.0.0/test/kafka/test_kafkasink.py +57 -0
  554. bitswan-0.0.0/test/matrix/__init__.py +5 -0
  555. bitswan-0.0.0/test/matrix/test_geo_matrix.py +68 -0
  556. bitswan-0.0.0/test/matrix/test_matrix.py +81 -0
  557. bitswan-0.0.0/test/matrix/test_named_matrix.py +83 -0
  558. bitswan-0.0.0/test/matrix/test_session_matrix.py +83 -0
  559. bitswan-0.0.0/test/matrix/test_time_window_matrix.py +96 -0
  560. bitswan-0.0.0/test/test_config_defaults.py +27 -0
  561. bitswan-0.0.0/test/test_metrics_service.py +63 -0
@@ -0,0 +1,5 @@
1
+ [run]
2
+ source=bspump/
3
+
4
+ [report]
5
+ include=bspump*
@@ -0,0 +1,90 @@
1
+ name: Release Workflow (PyPI, GitHub Release)
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ build-and-upload-pypi:
10
+ name: Build and Upload PyPI Package
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v3
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v4
19
+ with:
20
+ python-version: 3.9
21
+
22
+ - name: Install build tools
23
+ run: pip install build twine
24
+
25
+ - name: Generate CalVer version
26
+ id: calver
27
+ run: |
28
+ # Get current date in YYYY.MM.DD format
29
+ DATE_VERSION=$(date +%Y.%m.%d)
30
+ # Get GitHub run number
31
+ BUILD_NUMBER=${{ github.run_number }}
32
+ # Combine for final version
33
+ CALVER_VERSION="${DATE_VERSION}.${BUILD_NUMBER}"
34
+ echo "version=${CALVER_VERSION}" >> $GITHUB_OUTPUT
35
+ echo "Generated CalVer version: ${CALVER_VERSION}"
36
+
37
+ - name: Update version in __version__.py
38
+ run: |
39
+ # Update the version in bspump/__version__.py
40
+ sed -i "s/__version__ = .*/__version__ = \"${{ steps.calver.outputs.version }}\"/" bspump/__version__.py
41
+ cat bspump/__version__.py
42
+
43
+ - name: Build package
44
+ run: python -m build
45
+
46
+ - name: Upload to PyPI
47
+ env:
48
+ TWINE_USERNAME: "__token__"
49
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
50
+ run: twine upload dist/*
51
+
52
+ create-github-release:
53
+ name: Create GitHub Release
54
+ runs-on: ubuntu-latest
55
+ permissions:
56
+ contents: write
57
+
58
+ steps:
59
+ - name: Checkout code
60
+ uses: actions/checkout@v3
61
+
62
+ - name: Generate CalVer version
63
+ id: calver
64
+ run: |
65
+ # Get current date in YYYY.MM.DD format
66
+ DATE_VERSION=$(date +%Y.%m.%d)
67
+ # Get GitHub run number
68
+ BUILD_NUMBER=${{ github.run_number }}
69
+ # Combine for final version
70
+ CALVER_VERSION="${DATE_VERSION}.${BUILD_NUMBER}"
71
+ echo "version=${CALVER_VERSION}" >> $GITHUB_OUTPUT
72
+ echo "Generated CalVer version: ${CALVER_VERSION}"
73
+
74
+ - name: Create GitHub Release
75
+ uses: actions/create-release@v1
76
+ with:
77
+ tag_name: "v${{ steps.calver.outputs.version }}"
78
+ release_name: "Release v${{ steps.calver.outputs.version }}"
79
+ body: |
80
+ ## CalVer Release v${{ steps.calver.outputs.version }}
81
+
82
+ **Release Date:** $(date +%Y-%m-%d)
83
+ **Build Number:** ${{ github.run_number }}
84
+ **Commit:** ${{ github.sha }}
85
+
86
+ This is an automated release triggered by a push to master.
87
+ draft: false
88
+ prerelease: false
89
+ env:
90
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,33 @@
1
+ name: Build and Push Dockserver Docker Image
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ paths:
7
+ - 'docserver/**'
8
+
9
+ jobs:
10
+ build-and-push:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Check out the repo
15
+ uses: actions/checkout@v2
16
+
17
+ - name: Set up Docker Buildx
18
+ uses: docker/setup-buildx-action@v1
19
+
20
+ - name: Log in to Docker Hub
21
+ uses: docker/login-action@v1
22
+ with:
23
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
24
+ password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
25
+
26
+ - name: Get Year and Commit Hash
27
+ id: vars
28
+ run: |
29
+ echo "::set-output name=year::$(date +%Y)"
30
+ echo "::set-output name=commit_hash::$(git rev-parse --short HEAD)"
31
+
32
+ - name: Build and Push
33
+ run: bash docserver/build_and_push.sh
@@ -0,0 +1,31 @@
1
+ name: Build and Push Docker Image
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+
7
+ jobs:
8
+ build-and-push:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - name: Check out the repo
13
+ uses: actions/checkout@v2
14
+
15
+ - name: Set up Docker Buildx
16
+ uses: docker/setup-buildx-action@v1
17
+
18
+ - name: Log in to Docker Hub
19
+ uses: docker/login-action@v1
20
+ with:
21
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
22
+ password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
23
+
24
+ - name: Get Year and Commit Hash
25
+ id: vars
26
+ run: |
27
+ echo "::set-output name=year::$(date +%Y)"
28
+ echo "::set-output name=commit_hash::$(git rev-parse --short HEAD)"
29
+
30
+ - name: Build and Push
31
+ run: bash build_and_push.sh
@@ -0,0 +1,36 @@
1
+ name: Python 3.13 Test
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+
9
+ container:
10
+ image: python:3.13
11
+
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Install dependencies
15
+ run: |
16
+ apt-get update
17
+ apt-get -y install unixodbc-dev
18
+ git config --global --add safe.directory /__w/BitSwan/BitSwan
19
+ pip3 install --upgrade cython
20
+ pip3 install .[dev]
21
+
22
+ - name: Run tests
23
+ run: |
24
+ pytest bspump/file
25
+
26
+ - name: Run bitswan tests
27
+ run: |
28
+ bitswan-notebook --test examples/Testing/main.ipynb
29
+ bitswan-notebook --test examples/Testing/MultiplePipelines/main.ipynb
30
+ bitswan-notebook --test examples/Testing/AutoPipeline/main.ipynb
31
+
32
+
33
+ - name: Run linter
34
+ run: |
35
+ black --check bspump
36
+ ruff check bspump
@@ -0,0 +1,118 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ .hypothesis/
48
+ *.dot
49
+
50
+ # Translations
51
+ *.mo
52
+ *.pot
53
+
54
+ # Django stuff:
55
+ *.log
56
+ local_settings.py
57
+
58
+ # Flask stuff:
59
+ instance/
60
+ .webassets-cache
61
+
62
+ # Scrapy stuff:
63
+ .scrapy
64
+
65
+ # Sphinx documentation
66
+ docs/_build/
67
+
68
+ # PyBuilder
69
+ target/
70
+
71
+ # Jupyter Notebook
72
+ .ipynb_checkpoints
73
+
74
+ # pyenv
75
+ .python-version
76
+
77
+ # celery beat schedule file
78
+ celerybeat-schedule
79
+
80
+ # SageMath parsed files
81
+ *.sage.py
82
+
83
+ # dotenv
84
+ .env
85
+
86
+ # virtualenv
87
+ .venv
88
+ venv/
89
+ ENV/
90
+
91
+ # Spyder project settings
92
+ .spyderproject
93
+ .spyproject
94
+
95
+ # Rope project settings
96
+ .ropeproject
97
+
98
+ # mkdocs documentation
99
+ /site
100
+
101
+ # mypy
102
+ .mypy_cache/
103
+
104
+ # idea
105
+ .idea/
106
+
107
+ # ignoring site configuration
108
+ etc/site.conf
109
+ etc/site.d/
110
+
111
+ # ignoring example outputs
112
+ examples/data/ignore_*
113
+
114
+ doc/_build
115
+
116
+ # VSCode
117
+ .vscode/
118
+
@@ -0,0 +1,23 @@
1
+ variables:
2
+ DOCKER_IMAGE: bitswan-pre
3
+
4
+ stages:
5
+ - test
6
+ - build
7
+
8
+ test-py310:
9
+ image: python:3.10
10
+ stage: test
11
+ coverage: '/\d+\%$/'
12
+ script:
13
+ - apt-get update
14
+ - apt-get -y install unixodbc-dev
15
+ - pip3 install --upgrade cython
16
+ - pip3 install .
17
+ - pip install -r requirements-dev.txt
18
+ - pytest bspump/file
19
+ - ruff bspump
20
+
21
+ include:
22
+ - project: 'LibertyAces/Product/bitswanmonorepo'
23
+ file: 'cicd/docker-build-public.yml'
@@ -0,0 +1,45 @@
1
+ FROM python:3.13-slim-bookworm
2
+ MAINTAINER LibertyAces Ltd
3
+ LABEL "space.bitswan.pipeline.protocol-version"="2023.12-1"
4
+ LABEL "space.bitswan.pipeline.ide"="Jupyter"
5
+ LABEL src=https://github.com/bitswan-space/BitSwan
6
+ ENV ASABFORCECONSOLE=1
7
+ ENV PYTHONUNBUFFERED=1
8
+
9
+ RUN set -ex \
10
+ && apt-get update \
11
+ && apt-get -y upgrade
12
+
13
+ RUN apt-get -yqq install \
14
+ git \
15
+ gcc \
16
+ g++ \
17
+ libsnappy-dev \
18
+ autoconf \
19
+ automake \
20
+ libtool \
21
+ build-essential \
22
+ docker-compose
23
+
24
+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
25
+
26
+ COPY . /src/
27
+
28
+ RUN apt-get remove -y python3-yaml && apt-get autoremove -y
29
+
30
+ RUN cd /src/ && uv pip install --system .
31
+
32
+ COPY pre/ /opt/
33
+
34
+ CMD ["sh", "/opt/entrypoint.sh"]
35
+
36
+ # Setup bitswan user
37
+
38
+ RUN useradd --uid 1000 --create-home bitswan
39
+ ENV HOME=/home/bitswan
40
+ USER bitswan
41
+
42
+ USER root
43
+ RUN mkdir -p /home/bitswan/work
44
+ RUN chown -R bitswan:bitswan /home/bitswan/work
45
+
bitswan-0.0.0/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2018-2019, LibertyAces Ltd
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ * Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,3 @@
1
+ include *.txt *.md
2
+ recursive-include bspump/static *
3
+ recursive-include data *.css
bitswan-0.0.0/PKG-INFO ADDED
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.4
2
+ Name: bitswan
3
+ Version: 0.0.0
4
+ Summary: Bitswan is a framework for building automations and pipelines in Jupyter
5
+ Project-URL: homepage, https://github.com/bitswan-space/BitSwan
6
+ Author-email: LibertyAces Ltd <timothy.hobbs@libertyaces.com>
7
+ License: BSD 3-Clause License
8
+
9
+ Copyright (c) 2018-2019, LibertyAces Ltd
10
+ All rights reserved.
11
+
12
+ Redistribution and use in source and binary forms, with or without
13
+ modification, are permitted provided that the following conditions are met:
14
+
15
+ * Redistributions of source code must retain the above copyright notice, this
16
+ list of conditions and the following disclaimer.
17
+
18
+ * Redistributions in binary form must reproduce the above copyright notice,
19
+ this list of conditions and the following disclaimer in the documentation
20
+ and/or other materials provided with the distribution.
21
+
22
+ * Neither the name of the copyright holder nor the names of its
23
+ contributors may be used to endorse or promote products derived from
24
+ this software without specific prior written permission.
25
+
26
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
30
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
34
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
+ License-File: LICENSE
37
+ Requires-Dist: aiohttp>=3.8.3
38
+ Requires-Dist: aiomysql>=0.2.0
39
+ Requires-Dist: aiosmtplib>=1.1.3
40
+ Requires-Dist: aiozk>=0.25.0
41
+ Requires-Dist: certifi>=2023.7.22
42
+ Requires-Dist: confluent-kafka>=1.8.2
43
+ Requires-Dist: croniter>=1.4.1
44
+ Requires-Dist: cryptography>=44.0.1
45
+ Requires-Dist: docker
46
+ Requires-Dist: dockerfile-parse
47
+ Requires-Dist: fastavro>=0.23.5
48
+ Requires-Dist: fastjsonschema<3,>=2.16.2
49
+ Requires-Dist: google-api-python-client>=1.7.10
50
+ Requires-Dist: idna>=3.7
51
+ Requires-Dist: importlib-resources
52
+ Requires-Dist: jinja2>=3.1.6
53
+ Requires-Dist: jupyter
54
+ Requires-Dist: kazoo<3,>=2.9.0
55
+ Requires-Dist: matplotlib==3.8.0
56
+ Requires-Dist: mongoquery>=1.3.6
57
+ Requires-Dist: motor>=2.1.0
58
+ Requires-Dist: mysql-replication>=0.21
59
+ Requires-Dist: nest-asyncio==1.6.0
60
+ Requires-Dist: netaddr>=0.7.20
61
+ Requires-Dist: numpy>=1.19.0
62
+ Requires-Dist: orjson
63
+ Requires-Dist: paho-mqtt
64
+ Requires-Dist: pandas>=0.24.2
65
+ Requires-Dist: pika>=1.1.0
66
+ Requires-Dist: pyasn1==0.4.8
67
+ Requires-Dist: pybind11>=2.6.1
68
+ Requires-Dist: pyjwt==v2.10.1
69
+ Requires-Dist: pymongo>=3.10.1
70
+ Requires-Dist: pymysql>=1.1.1
71
+ Requires-Dist: python-dotenv==1.0.1
72
+ Requires-Dist: pytz>=2020.1
73
+ Requires-Dist: pyyaml>=5.4
74
+ Requires-Dist: requests>=2.32.0
75
+ Requires-Dist: setuptools>=70.0.0
76
+ Requires-Dist: urllib3>=1.26.19
77
+ Requires-Dist: xxhash>=1.4.4
78
+ Requires-Dist: zipp>=3.19.1
79
+ Provides-Extra: dev
80
+ Requires-Dist: black==23.1.0; extra == 'dev'
81
+ Requires-Dist: coverage==4.5.3; extra == 'dev'
82
+ Requires-Dist: pytest; extra == 'dev'
83
+ Requires-Dist: pytest-asyncio; extra == 'dev'
84
+ Requires-Dist: ruff; extra == 'dev'
85
+ Requires-Dist: watchdog==6.0.0; extra == 'dev'
86
+ Provides-Extra: pyjq-support
87
+ Requires-Dist: pyjq>=2.6.0; extra == 'pyjq-support'
88
+ Description-Content-Type: text/markdown
89
+
90
+ Bitswan: A tool for building Pipelines & Automations in Jupyter
91
+ ===============================================
92
+
93
+ You can find example pipelines in the [examples](./examples/) directory.
94
+
95
+ Installation
96
+ --------------
97
+
98
+ This library is part of the bitswan suite which is managed by the bitswan workspace cli.
99
+ You must first install the [bitswan workspaces](https://github.com/bitswan-space/bitswan-workspaces) cli before installing and using the bitswan notebooks cli.
100
+
101
+ ```
102
+ $ git clone git@github.com:bitswan-space/BitSwan.git
103
+ $ cd BitSwan
104
+ $ curl -LsSf https://astral.sh/uv/install.sh | sh
105
+ $ uv venv
106
+ $ source .venv/bin/activate
107
+ $ uv pip install -e ".[dev]"
108
+ ```
109
+
110
+ Running pipelines
111
+ --------------------
112
+
113
+ You can run a pipeline with a simple command:
114
+
115
+ ```
116
+ $ bitswan notebook examples/WebForms/main.ipynb
117
+ ```
118
+
119
+ When developing web endpoints it can be helpful to instruct the pipeline to automatically restart if the source code changes.
120
+
121
+ ```
122
+ $ bitswan notebook examples/WebForms/main.ipynb --watch
123
+ ```
124
+
125
+ Running Tests
126
+ ----------------
127
+
128
+ You can find examples for automatically testing pipelines in the [testing examples](./examples/Testing) directory.
129
+
130
+ Run tests with the `--test` flag.
131
+
132
+ ```
133
+ $ bitswan notebook examples/Testing/InspectError/main.ipynb --test
134
+
135
+ Running tests for pipeline Kafka2KafkaPipeline.
136
+
137
+ ┌ Testing event: b'foo'
138
+ └ Outputs: [b'FOO'] ✔
139
+
140
+ All tests passed for Kafka2KafkaPipeline.
141
+
142
+
143
+ Running tests for pipeline auto_pipeline_1.
144
+
145
+ ┌ Testing event: b'{"foo":"aaa"}'
146
+ └ Outputs: [b'{"foo": "A A A"}'] ✔
147
+
148
+ ┌ Testing event: b'{"foo":"aab"}'
149
+ │ Probing after-upper.
150
+ └ Outputs: [b'{"foo": "B A A"}'] ✔
151
+
152
+ ┌ Testing event: b'{"foo":"cab"}'
153
+ └ Outputs: [b'{"foo": "B A C"}'] ✘
154
+ ```
155
+
156
+ You can combine `--test` with `--watch` to automatically rerun tests whenever the source files change.
157
+
158
+
159
+ Licence
160
+ -------
161
+
162
+ Bitswan is open-source software, available under BSD 3-Clause License.
163
+
@@ -0,0 +1,74 @@
1
+ Bitswan: A tool for building Pipelines & Automations in Jupyter
2
+ ===============================================
3
+
4
+ You can find example pipelines in the [examples](./examples/) directory.
5
+
6
+ Installation
7
+ --------------
8
+
9
+ This library is part of the bitswan suite which is managed by the bitswan workspace cli.
10
+ You must first install the [bitswan workspaces](https://github.com/bitswan-space/bitswan-workspaces) cli before installing and using the bitswan notebooks cli.
11
+
12
+ ```
13
+ $ git clone git@github.com:bitswan-space/BitSwan.git
14
+ $ cd BitSwan
15
+ $ curl -LsSf https://astral.sh/uv/install.sh | sh
16
+ $ uv venv
17
+ $ source .venv/bin/activate
18
+ $ uv pip install -e ".[dev]"
19
+ ```
20
+
21
+ Running pipelines
22
+ --------------------
23
+
24
+ You can run a pipeline with a simple command:
25
+
26
+ ```
27
+ $ bitswan notebook examples/WebForms/main.ipynb
28
+ ```
29
+
30
+ When developing web endpoints it can be helpful to instruct the pipeline to automatically restart if the source code changes.
31
+
32
+ ```
33
+ $ bitswan notebook examples/WebForms/main.ipynb --watch
34
+ ```
35
+
36
+ Running Tests
37
+ ----------------
38
+
39
+ You can find examples for automatically testing pipelines in the [testing examples](./examples/Testing) directory.
40
+
41
+ Run tests with the `--test` flag.
42
+
43
+ ```
44
+ $ bitswan notebook examples/Testing/InspectError/main.ipynb --test
45
+
46
+ Running tests for pipeline Kafka2KafkaPipeline.
47
+
48
+ ┌ Testing event: b'foo'
49
+ └ Outputs: [b'FOO'] ✔
50
+
51
+ All tests passed for Kafka2KafkaPipeline.
52
+
53
+
54
+ Running tests for pipeline auto_pipeline_1.
55
+
56
+ ┌ Testing event: b'{"foo":"aaa"}'
57
+ └ Outputs: [b'{"foo": "A A A"}'] ✔
58
+
59
+ ┌ Testing event: b'{"foo":"aab"}'
60
+ │ Probing after-upper.
61
+ └ Outputs: [b'{"foo": "B A A"}'] ✔
62
+
63
+ ┌ Testing event: b'{"foo":"cab"}'
64
+ └ Outputs: [b'{"foo": "B A C"}'] ✘
65
+ ```
66
+
67
+ You can combine `--test` with `--watch` to automatically rerun tests whenever the source files change.
68
+
69
+
70
+ Licence
71
+ -------
72
+
73
+ Bitswan is open-source software, available under BSD 3-Clause License.
74
+