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.
- bitswan-0.0.0/.coveragerc +5 -0
- bitswan-0.0.0/.github/workflows/bitswan-release.yml +90 -0
- bitswan-0.0.0/.github/workflows/docker-publish-dockserver.yml +33 -0
- bitswan-0.0.0/.github/workflows/docker-publish.yml +31 -0
- bitswan-0.0.0/.github/workflows/test.yml +36 -0
- bitswan-0.0.0/.gitignore +118 -0
- bitswan-0.0.0/.gitlab-ci.yml +23 -0
- bitswan-0.0.0/Dockerfile +45 -0
- bitswan-0.0.0/LICENSE +29 -0
- bitswan-0.0.0/MANIFEST.in +3 -0
- bitswan-0.0.0/PKG-INFO +163 -0
- bitswan-0.0.0/README.md +74 -0
- bitswan-0.0.0/bspump/__init__.py +54 -0
- bitswan-0.0.0/bspump/__main__.py +4 -0
- bitswan-0.0.0/bspump/__version__.py +12 -0
- bitswan-0.0.0/bspump/abc/__init__.py +0 -0
- bitswan-0.0.0/bspump/abc/anomaly.py +41 -0
- bitswan-0.0.0/bspump/abc/connection.py +71 -0
- bitswan-0.0.0/bspump/abc/generator.py +82 -0
- bitswan-0.0.0/bspump/abc/lookup.py +307 -0
- bitswan-0.0.0/bspump/abc/lookupprovider.py +46 -0
- bitswan-0.0.0/bspump/abc/processor.py +136 -0
- bitswan-0.0.0/bspump/abc/sink.py +13 -0
- bitswan-0.0.0/bspump/abc/source.py +356 -0
- bitswan-0.0.0/bspump/aggregation/__init__.py +5 -0
- bitswan-0.0.0/bspump/aggregation/hyperloglog.py +125 -0
- bitswan-0.0.0/bspump/aio/__init__.py +6 -0
- bitswan-0.0.0/bspump/aio/sink.py +70 -0
- bitswan-0.0.0/bspump/amqp/__init__.py +10 -0
- bitswan-0.0.0/bspump/amqp/connection.py +73 -0
- bitswan-0.0.0/bspump/amqp/sink.py +79 -0
- bitswan-0.0.0/bspump/amqp/source.py +144 -0
- bitswan-0.0.0/bspump/analyzer/__init__.py +20 -0
- bitswan-0.0.0/bspump/analyzer/analyzer.py +112 -0
- bitswan-0.0.0/bspump/analyzer/analyzingsource.py +49 -0
- bitswan-0.0.0/bspump/analyzer/geoanalyzer.py +98 -0
- bitswan-0.0.0/bspump/analyzer/latch.py +117 -0
- bitswan-0.0.0/bspump/analyzer/sessionanalyzer.py +102 -0
- bitswan-0.0.0/bspump/analyzer/threshold.py +208 -0
- bitswan-0.0.0/bspump/analyzer/timedriftanalyzer.py +164 -0
- bitswan-0.0.0/bspump/analyzer/timewindowanalyzer.py +83 -0
- bitswan-0.0.0/bspump/anomaly/__init__.py +12 -0
- bitswan-0.0.0/bspump/anomaly/analyzer.py +100 -0
- bitswan-0.0.0/bspump/anomaly/generalanomaly.py +57 -0
- bitswan-0.0.0/bspump/anomaly/manager.py +117 -0
- bitswan-0.0.0/bspump/anomaly/storage.py +219 -0
- bitswan-0.0.0/bspump/application.py +158 -0
- bitswan-0.0.0/bspump/asab/__init__.py +50 -0
- bitswan-0.0.0/bspump/asab/__version__.py +12 -0
- bitswan-0.0.0/bspump/asab/abc/__init__.py +9 -0
- bitswan-0.0.0/bspump/asab/abc/module.py +75 -0
- bitswan-0.0.0/bspump/asab/abc/service.py +81 -0
- bitswan-0.0.0/bspump/asab/abc/singleton.py +24 -0
- bitswan-0.0.0/bspump/asab/alert.py +258 -0
- bitswan-0.0.0/bspump/asab/api/__init__.py +5 -0
- bitswan-0.0.0/bspump/asab/api/discovery.py +179 -0
- bitswan-0.0.0/bspump/asab/api/doc.py +366 -0
- bitswan-0.0.0/bspump/asab/api/doc_templates.py +109 -0
- bitswan-0.0.0/bspump/asab/api/log.py +161 -0
- bitswan-0.0.0/bspump/asab/api/service.py +235 -0
- bitswan-0.0.0/bspump/asab/api/web_handler.py +127 -0
- bitswan-0.0.0/bspump/asab/application.py +869 -0
- bitswan-0.0.0/bspump/asab/config.py +566 -0
- bitswan-0.0.0/bspump/asab/exceptions.py +54 -0
- bitswan-0.0.0/bspump/asab/library/__init__.py +16 -0
- bitswan-0.0.0/bspump/asab/library/dirsync.py +63 -0
- bitswan-0.0.0/bspump/asab/library/item.py +23 -0
- bitswan-0.0.0/bspump/asab/library/providers/__init__.py +0 -0
- bitswan-0.0.0/bspump/asab/library/providers/abc.py +49 -0
- bitswan-0.0.0/bspump/asab/library/providers/azurestorage.py +256 -0
- bitswan-0.0.0/bspump/asab/library/providers/filesystem.py +221 -0
- bitswan-0.0.0/bspump/asab/library/providers/filesystem_inotify.py +53 -0
- bitswan-0.0.0/bspump/asab/library/providers/git.py +217 -0
- bitswan-0.0.0/bspump/asab/library/providers/libsreg.py +176 -0
- bitswan-0.0.0/bspump/asab/library/providers/zookeeper.py +366 -0
- bitswan-0.0.0/bspump/asab/library/service.py +496 -0
- bitswan-0.0.0/bspump/asab/log.py +617 -0
- bitswan-0.0.0/bspump/asab/metrics/__init__.py +43 -0
- bitswan-0.0.0/bspump/asab/metrics/http.py +29 -0
- bitswan-0.0.0/bspump/asab/metrics/influxdb.py +308 -0
- bitswan-0.0.0/bspump/asab/metrics/metrics.py +606 -0
- bitswan-0.0.0/bspump/asab/metrics/native.py +66 -0
- bitswan-0.0.0/bspump/asab/metrics/openmetric.py +165 -0
- bitswan-0.0.0/bspump/asab/metrics/service.py +411 -0
- bitswan-0.0.0/bspump/asab/metrics/storage.py +48 -0
- bitswan-0.0.0/bspump/asab/metrics/web_handler.py +292 -0
- bitswan-0.0.0/bspump/asab/pdict.py +93 -0
- bitswan-0.0.0/bspump/asab/proactor/__init__.py +32 -0
- bitswan-0.0.0/bspump/asab/proactor/service.py +47 -0
- bitswan-0.0.0/bspump/asab/pubsub.py +357 -0
- bitswan-0.0.0/bspump/asab/sentry/__init__.py +15 -0
- bitswan-0.0.0/bspump/asab/sentry/service.py +300 -0
- bitswan-0.0.0/bspump/asab/socket.py +38 -0
- bitswan-0.0.0/bspump/asab/storage/__init__.py +39 -0
- bitswan-0.0.0/bspump/asab/storage/elasticsearch.py +621 -0
- bitswan-0.0.0/bspump/asab/storage/exceptions.py +9 -0
- bitswan-0.0.0/bspump/asab/storage/inmemory.py +151 -0
- bitswan-0.0.0/bspump/asab/storage/mongodb.py +211 -0
- bitswan-0.0.0/bspump/asab/storage/service.py +233 -0
- bitswan-0.0.0/bspump/asab/storage/upsertor.py +177 -0
- bitswan-0.0.0/bspump/asab/task.py +142 -0
- bitswan-0.0.0/bspump/asab/timer.py +97 -0
- bitswan-0.0.0/bspump/asab/tls.py +104 -0
- bitswan-0.0.0/bspump/asab/utils.py +205 -0
- bitswan-0.0.0/bspump/asab/web/__init__.py +63 -0
- bitswan-0.0.0/bspump/asab/web/accesslog.py +54 -0
- bitswan-0.0.0/bspump/asab/web/auth/__init__.py +8 -0
- bitswan-0.0.0/bspump/asab/web/auth/decorator.py +82 -0
- bitswan-0.0.0/bspump/asab/web/auth/service.py +607 -0
- bitswan-0.0.0/bspump/asab/web/authz/__init__.py +12 -0
- bitswan-0.0.0/bspump/asab/web/authz/decorator.py +118 -0
- bitswan-0.0.0/bspump/asab/web/authz/middleware.py +19 -0
- bitswan-0.0.0/bspump/asab/web/authz/service.py +228 -0
- bitswan-0.0.0/bspump/asab/web/container.py +238 -0
- bitswan-0.0.0/bspump/asab/web/metrics.py +51 -0
- bitswan-0.0.0/bspump/asab/web/rest/__init__.py +8 -0
- bitswan-0.0.0/bspump/asab/web/rest/json.py +329 -0
- bitswan-0.0.0/bspump/asab/web/service.py +88 -0
- bitswan-0.0.0/bspump/asab/web/session/__init__.py +54 -0
- bitswan-0.0.0/bspump/asab/web/session/cookies.py +37 -0
- bitswan-0.0.0/bspump/asab/web/session/inmemstor.py +60 -0
- bitswan-0.0.0/bspump/asab/web/session/session.py +81 -0
- bitswan-0.0.0/bspump/asab/web/session/storage.py +40 -0
- bitswan-0.0.0/bspump/asab/web/staticdir.py +33 -0
- bitswan-0.0.0/bspump/asab/web/tenant/__init__.py +9 -0
- bitswan-0.0.0/bspump/asab/web/tenant/midleware.py +44 -0
- bitswan-0.0.0/bspump/asab/web/tenant/service.py +93 -0
- bitswan-0.0.0/bspump/asab/web/tenant/web.py +13 -0
- bitswan-0.0.0/bspump/asab/web/webcrypto.py +103 -0
- bitswan-0.0.0/bspump/asab/web/websocket.py +156 -0
- bitswan-0.0.0/bspump/asab/zookeeper/__init__.py +17 -0
- bitswan-0.0.0/bspump/asab/zookeeper/container.py +259 -0
- bitswan-0.0.0/bspump/asab/zookeeper/service.py +28 -0
- bitswan-0.0.0/bspump/asab/zookeeper/wrapper.py +110 -0
- bitswan-0.0.0/bspump/avro/__init__.py +11 -0
- bitswan-0.0.0/bspump/avro/deserializer.py +34 -0
- bitswan-0.0.0/bspump/avro/loader.py +28 -0
- bitswan-0.0.0/bspump/avro/serializer.py +56 -0
- bitswan-0.0.0/bspump/avro/sink.py +140 -0
- bitswan-0.0.0/bspump/avro/source.py +34 -0
- bitswan-0.0.0/bspump/cache/__init__.py +7 -0
- bitswan-0.0.0/bspump/cache/cachedict.py +2 -0
- bitswan-0.0.0/bspump/cache/lrucachedict.py +58 -0
- bitswan-0.0.0/bspump/common/__init__.py +80 -0
- bitswan-0.0.0/bspump/common/aggregator.py +339 -0
- bitswan-0.0.0/bspump/common/bytes.py +74 -0
- bitswan-0.0.0/bspump/common/flatten.py +100 -0
- bitswan-0.0.0/bspump/common/hexlify.py +23 -0
- bitswan-0.0.0/bspump/common/iterator.py +57 -0
- bitswan-0.0.0/bspump/common/jq.py +77 -0
- bitswan-0.0.0/bspump/common/json.py +78 -0
- bitswan-0.0.0/bspump/common/jsonbytes.py +27 -0
- bitswan-0.0.0/bspump/common/mapping.py +119 -0
- bitswan-0.0.0/bspump/common/null.py +19 -0
- bitswan-0.0.0/bspump/common/print.py +182 -0
- bitswan-0.0.0/bspump/common/routing.py +404 -0
- bitswan-0.0.0/bspump/common/tee.py +161 -0
- bitswan-0.0.0/bspump/common/time.py +57 -0
- bitswan-0.0.0/bspump/common/transfr.py +61 -0
- bitswan-0.0.0/bspump/crypto/__init__.py +17 -0
- bitswan-0.0.0/bspump/crypto/aes.py +47 -0
- bitswan-0.0.0/bspump/crypto/hashing.py +73 -0
- bitswan-0.0.0/bspump/declarative/__init__.py +39 -0
- bitswan-0.0.0/bspump/declarative/abc.py +154 -0
- bitswan-0.0.0/bspump/declarative/builder.py +334 -0
- bitswan-0.0.0/bspump/declarative/declerror.py +16 -0
- bitswan-0.0.0/bspump/declarative/dot.py +68 -0
- bitswan-0.0.0/bspump/declarative/expression/__init__.py +157 -0
- bitswan-0.0.0/bspump/declarative/expression/arithmetic.py +214 -0
- bitswan-0.0.0/bspump/declarative/expression/comparison.py +264 -0
- bitswan-0.0.0/bspump/declarative/expression/datastructs/__init__.py +0 -0
- bitswan-0.0.0/bspump/declarative/expression/datastructs/dict_parse.py +122 -0
- bitswan-0.0.0/bspump/declarative/expression/datastructs/dictexpr.py +208 -0
- bitswan-0.0.0/bspump/declarative/expression/datastructs/itemexpr.py +212 -0
- bitswan-0.0.0/bspump/declarative/expression/datastructs/listexpr.py +31 -0
- bitswan-0.0.0/bspump/declarative/expression/datastructs/tupleexpr.py +12 -0
- bitswan-0.0.0/bspump/declarative/expression/datetime/__init__.py +0 -0
- bitswan-0.0.0/bspump/declarative/expression/datetime/dtformat.py +53 -0
- bitswan-0.0.0/bspump/declarative/expression/datetime/dtget.py +72 -0
- bitswan-0.0.0/bspump/declarative/expression/datetime/dtparse.py +80 -0
- bitswan-0.0.0/bspump/declarative/expression/datetime/nowexpr.py +33 -0
- bitswan-0.0.0/bspump/declarative/expression/ip/__init__.py +0 -0
- bitswan-0.0.0/bspump/declarative/expression/ip/insubnetexpr.py +50 -0
- bitswan-0.0.0/bspump/declarative/expression/ip/ipformatexpr.py +42 -0
- bitswan-0.0.0/bspump/declarative/expression/ip/ipparseexpr.py +32 -0
- bitswan-0.0.0/bspump/declarative/expression/logical.py +89 -0
- bitswan-0.0.0/bspump/declarative/expression/lookup/__init__.py +0 -0
- bitswan-0.0.0/bspump/declarative/expression/lookup/lookupexpr.py +48 -0
- bitswan-0.0.0/bspump/declarative/expression/statement/__init__.py +0 -0
- bitswan-0.0.0/bspump/declarative/expression/statement/firstexpr.py +11 -0
- bitswan-0.0.0/bspump/declarative/expression/statement/forexpr.py +21 -0
- bitswan-0.0.0/bspump/declarative/expression/statement/funexpr.py +30 -0
- bitswan-0.0.0/bspump/declarative/expression/statement/ifexpr.py +52 -0
- bitswan-0.0.0/bspump/declarative/expression/statement/selfexpr.py +31 -0
- bitswan-0.0.0/bspump/declarative/expression/statement/whenexpr.py +109 -0
- bitswan-0.0.0/bspump/declarative/expression/string/__init__.py +0 -0
- bitswan-0.0.0/bspump/declarative/expression/string/contains.py +34 -0
- bitswan-0.0.0/bspump/declarative/expression/string/cutexpr.py +51 -0
- bitswan-0.0.0/bspump/declarative/expression/string/endswith.py +34 -0
- bitswan-0.0.0/bspump/declarative/expression/string/joinexpr.py +78 -0
- bitswan-0.0.0/bspump/declarative/expression/string/lowerexpr.py +25 -0
- bitswan-0.0.0/bspump/declarative/expression/string/regex.py +270 -0
- bitswan-0.0.0/bspump/declarative/expression/string/split.py +41 -0
- bitswan-0.0.0/bspump/declarative/expression/string/startswith.py +38 -0
- bitswan-0.0.0/bspump/declarative/expression/string/substringexpr.py +48 -0
- bitswan-0.0.0/bspump/declarative/expression/string/upperexpr.py +25 -0
- bitswan-0.0.0/bspump/declarative/expression/test/__init__.py +0 -0
- bitswan-0.0.0/bspump/declarative/expression/test/inexpr.py +112 -0
- bitswan-0.0.0/bspump/declarative/expression/utility/__init__.py +0 -0
- bitswan-0.0.0/bspump/declarative/expression/utility/castexpr.py +90 -0
- bitswan-0.0.0/bspump/declarative/expression/utility/context.py +80 -0
- bitswan-0.0.0/bspump/declarative/expression/utility/debugexpr.py +25 -0
- bitswan-0.0.0/bspump/declarative/expression/utility/hashexpr.py +92 -0
- bitswan-0.0.0/bspump/declarative/expression/utility/mapexpr.py +66 -0
- bitswan-0.0.0/bspump/declarative/expression/value/__init__.py +0 -0
- bitswan-0.0.0/bspump/declarative/expression/value/eventexpr.py +94 -0
- bitswan-0.0.0/bspump/declarative/expression/value/valueexpr.py +27 -0
- bitswan-0.0.0/bspump/declarative/generator.py +51 -0
- bitswan-0.0.0/bspump/declarative/optimizer.py +65 -0
- bitswan-0.0.0/bspump/declarative/processor.py +34 -0
- bitswan-0.0.0/bspump/declarative/segmentbuilder.py +159 -0
- bitswan-0.0.0/bspump/declarative/timewindowanalyzer.py +115 -0
- bitswan-0.0.0/bspump/elasticsearch/__init__.py +12 -0
- bitswan-0.0.0/bspump/elasticsearch/connection.py +560 -0
- bitswan-0.0.0/bspump/elasticsearch/data_feeder.py +107 -0
- bitswan-0.0.0/bspump/elasticsearch/lookup.py +307 -0
- bitswan-0.0.0/bspump/elasticsearch/sink.py +153 -0
- bitswan-0.0.0/bspump/elasticsearch/source.py +241 -0
- bitswan-0.0.0/bspump/exception.py +6 -0
- bitswan-0.0.0/bspump/file/__init__.py +19 -0
- bitswan-0.0.0/bspump/file/fileabcsource.py +384 -0
- bitswan-0.0.0/bspump/file/fileblocksink.py +93 -0
- bitswan-0.0.0/bspump/file/fileblocksource.py +59 -0
- bitswan-0.0.0/bspump/file/filecsvsink.py +146 -0
- bitswan-0.0.0/bspump/file/filecsvsource.py +103 -0
- bitswan-0.0.0/bspump/file/filejsonsource.py +52 -0
- bitswan-0.0.0/bspump/file/filelinesource.py +133 -0
- bitswan-0.0.0/bspump/file/globscan.py +127 -0
- bitswan-0.0.0/bspump/file/lookupprovider.py +75 -0
- bitswan-0.0.0/bspump/fileloader.py +25 -0
- bitswan-0.0.0/bspump/filter/__init__.py +9 -0
- bitswan-0.0.0/bspump/filter/attributefilter.py +49 -0
- bitswan-0.0.0/bspump/filter/contentfilter.py +64 -0
- bitswan-0.0.0/bspump/filter/timedriftfilter.py +53 -0
- bitswan-0.0.0/bspump/ftp/__init__.py +7 -0
- bitswan-0.0.0/bspump/ftp/connection.py +59 -0
- bitswan-0.0.0/bspump/ftp/source.py +132 -0
- bitswan-0.0.0/bspump/googledrive/__init__.py +10 -0
- bitswan-0.0.0/bspump/googledrive/abcsink.py +72 -0
- bitswan-0.0.0/bspump/googledrive/blocksink.py +61 -0
- bitswan-0.0.0/bspump/googledrive/connection.py +70 -0
- bitswan-0.0.0/bspump/http/__init__.py +19 -0
- bitswan-0.0.0/bspump/http/client/__init__.py +0 -0
- bitswan-0.0.0/bspump/http/client/abcsource.py +100 -0
- bitswan-0.0.0/bspump/http/client/source.py +32 -0
- bitswan-0.0.0/bspump/http/client/wssink.py +130 -0
- bitswan-0.0.0/bspump/http/lookupprovider.py +152 -0
- bitswan-0.0.0/bspump/http/web/__init__.py +0 -0
- bitswan-0.0.0/bspump/http/web/components/__init__.py +29 -0
- bitswan-0.0.0/bspump/http/web/components/base_field.py +23 -0
- bitswan-0.0.0/bspump/http/web/components/button.py +24 -0
- bitswan-0.0.0/bspump/http/web/components/checkbox_field.py +26 -0
- bitswan-0.0.0/bspump/http/web/components/choice_field.py +17 -0
- bitswan-0.0.0/bspump/http/web/components/date_field.py +27 -0
- bitswan-0.0.0/bspump/http/web/components/datetime_field.py +26 -0
- bitswan-0.0.0/bspump/http/web/components/field.py +60 -0
- bitswan-0.0.0/bspump/http/web/components/field_set.py +48 -0
- bitswan-0.0.0/bspump/http/web/components/file_field.py +31 -0
- bitswan-0.0.0/bspump/http/web/components/float_field.py +21 -0
- bitswan-0.0.0/bspump/http/web/components/int_field.py +21 -0
- bitswan-0.0.0/bspump/http/web/components/raw_json.py +19 -0
- bitswan-0.0.0/bspump/http/web/components/text_field.py +12 -0
- bitswan-0.0.0/bspump/http/web/server.py +584 -0
- bitswan-0.0.0/bspump/http/web/sink.py +93 -0
- bitswan-0.0.0/bspump/http/web/source.py +137 -0
- bitswan-0.0.0/bspump/http/web/template_env.py +21 -0
- bitswan-0.0.0/bspump/http/web/templates/button.html +5 -0
- bitswan-0.0.0/bspump/http/web/templates/checkbox-field.html +5 -0
- bitswan-0.0.0/bspump/http/web/templates/choice-field.html +7 -0
- bitswan-0.0.0/bspump/http/web/templates/date-field.html +9 -0
- bitswan-0.0.0/bspump/http/web/templates/datetime-field.html +9 -0
- bitswan-0.0.0/bspump/http/web/templates/field.html +6 -0
- bitswan-0.0.0/bspump/http/web/templates/fieldset.html +9 -0
- bitswan-0.0.0/bspump/http/web/templates/file-field.html +3 -0
- bitswan-0.0.0/bspump/http/web/templates/list.html +6 -0
- bitswan-0.0.0/bspump/http/web/templates/nested-json.html +6 -0
- bitswan-0.0.0/bspump/http/web/templates/number-field.html +3 -0
- bitswan-0.0.0/bspump/http/web/templates/output-form.html +26 -0
- bitswan-0.0.0/bspump/http/web/templates/raw-json-field.html +3 -0
- bitswan-0.0.0/bspump/http/web/templates/source-form.html +66 -0
- bitswan-0.0.0/bspump/http/web/templates/text-field.html +6 -0
- bitswan-0.0.0/bspump/http/web/wssource.py +57 -0
- bitswan-0.0.0/bspump/influxdb/__init__.py +7 -0
- bitswan-0.0.0/bspump/influxdb/connection.py +218 -0
- bitswan-0.0.0/bspump/influxdb/sink.py +99 -0
- bitswan-0.0.0/bspump/integrity/__init__.py +5 -0
- bitswan-0.0.0/bspump/integrity/integrityenricher.py +77 -0
- bitswan-0.0.0/bspump/ipc/__init__.py +19 -0
- bitswan-0.0.0/bspump/ipc/datagram.py +171 -0
- bitswan-0.0.0/bspump/ipc/protocol.py +115 -0
- bitswan-0.0.0/bspump/ipc/stream.py +166 -0
- bitswan-0.0.0/bspump/ipc/stream_client_sink.py +195 -0
- bitswan-0.0.0/bspump/ipc/stream_server_source.py +228 -0
- bitswan-0.0.0/bspump/jupyter/__init__.py +49 -0
- bitswan-0.0.0/bspump/jupyter/jupyter.py +651 -0
- bitswan-0.0.0/bspump/kafka/__init__.py +13 -0
- bitswan-0.0.0/bspump/kafka/batchsink.py +113 -0
- bitswan-0.0.0/bspump/kafka/connection.py +36 -0
- bitswan-0.0.0/bspump/kafka/keyfilter.py +53 -0
- bitswan-0.0.0/bspump/kafka/sink.py +128 -0
- bitswan-0.0.0/bspump/kafka/source.py +181 -0
- bitswan-0.0.0/bspump/kafka/topic_initializer.py +324 -0
- bitswan-0.0.0/bspump/ldap/__init__.py +7 -0
- bitswan-0.0.0/bspump/ldap/connection.py +110 -0
- bitswan-0.0.0/bspump/ldap/source.py +94 -0
- bitswan-0.0.0/bspump/lookup/__init__.py +12 -0
- bitswan-0.0.0/bspump/lookup/index.py +312 -0
- bitswan-0.0.0/bspump/lookup/ipgeolookup.py +155 -0
- bitswan-0.0.0/bspump/lookup/matrixlookup.py +110 -0
- bitswan-0.0.0/bspump/lookup/memcachedlookup.py +51 -0
- bitswan-0.0.0/bspump/mail/__init__.py +8 -0
- bitswan-0.0.0/bspump/mail/smtpconnection.py +111 -0
- bitswan-0.0.0/bspump/mail/smtpsink.py +25 -0
- bitswan-0.0.0/bspump/main.py +132 -0
- bitswan-0.0.0/bspump/matrix/__init__.py +26 -0
- bitswan-0.0.0/bspump/matrix/geomatrix.py +260 -0
- bitswan-0.0.0/bspump/matrix/matrix.py +247 -0
- bitswan-0.0.0/bspump/matrix/matrixexportcsvgenerator.py +70 -0
- bitswan-0.0.0/bspump/matrix/namedmatrix.py +165 -0
- bitswan-0.0.0/bspump/matrix/sessionmatrix.py +106 -0
- bitswan-0.0.0/bspump/matrix/source.py +19 -0
- bitswan-0.0.0/bspump/matrix/timewindowmatrix.py +482 -0
- bitswan-0.0.0/bspump/matrix/utils/__init__.py +16 -0
- bitswan-0.0.0/bspump/matrix/utils/closedrows.py +87 -0
- bitswan-0.0.0/bspump/matrix/utils/index.py +109 -0
- bitswan-0.0.0/bspump/matrix/utils/timeconfig.py +56 -0
- bitswan-0.0.0/bspump/matrix/utils/warmingupcount.py +60 -0
- bitswan-0.0.0/bspump/model/__init__.py +3 -0
- bitswan-0.0.0/bspump/model/model.py +61 -0
- bitswan-0.0.0/bspump/mongodb/__init__.py +13 -0
- bitswan-0.0.0/bspump/mongodb/changestreamsource.py +75 -0
- bitswan-0.0.0/bspump/mongodb/connection.py +95 -0
- bitswan-0.0.0/bspump/mongodb/lookup.py +212 -0
- bitswan-0.0.0/bspump/mongodb/sink.py +118 -0
- bitswan-0.0.0/bspump/mongodb/source.py +67 -0
- bitswan-0.0.0/bspump/mqtt/__init__.py +6 -0
- bitswan-0.0.0/bspump/mqtt/connection.py +70 -0
- bitswan-0.0.0/bspump/mqtt/service.py +221 -0
- bitswan-0.0.0/bspump/mqtt/sink.py +19 -0
- bitswan-0.0.0/bspump/mqtt/source.py +35 -0
- bitswan-0.0.0/bspump/mysql/__init__.py +12 -0
- bitswan-0.0.0/bspump/mysql/binlogsource.py +244 -0
- bitswan-0.0.0/bspump/mysql/connection.py +356 -0
- bitswan-0.0.0/bspump/mysql/convertors.py +32 -0
- bitswan-0.0.0/bspump/mysql/lookup.py +180 -0
- bitswan-0.0.0/bspump/mysql/sink.py +36 -0
- bitswan-0.0.0/bspump/mysql/source.py +56 -0
- bitswan-0.0.0/bspump/odbc/__init__.py +9 -0
- bitswan-0.0.0/bspump/odbc/connection.py +174 -0
- bitswan-0.0.0/bspump/odbc/sink.py +36 -0
- bitswan-0.0.0/bspump/odbc/source.py +36 -0
- bitswan-0.0.0/bspump/parquet/__init__.py +3 -0
- bitswan-0.0.0/bspump/parquet/sink.py +264 -0
- bitswan-0.0.0/bspump/pipeline.py +1033 -0
- bitswan-0.0.0/bspump/postgresql/__init__.py +13 -0
- bitswan-0.0.0/bspump/postgresql/connection.py +292 -0
- bitswan-0.0.0/bspump/postgresql/logicalreplicationsource.py +113 -0
- bitswan-0.0.0/bspump/postgresql/lookup.py +182 -0
- bitswan-0.0.0/bspump/postgresql/sink.py +36 -0
- bitswan-0.0.0/bspump/postgresql/source.py +52 -0
- bitswan-0.0.0/bspump/pumpbuilder.py +274 -0
- bitswan-0.0.0/bspump/random/__init__.py +10 -0
- bitswan-0.0.0/bspump/random/randomdrop.py +21 -0
- bitswan-0.0.0/bspump/random/randomenricher.py +41 -0
- bitswan-0.0.0/bspump/random/source.py +71 -0
- bitswan-0.0.0/bspump/service.py +374 -0
- bitswan-0.0.0/bspump/slack/__init__.py +10 -0
- bitswan-0.0.0/bspump/slack/connection.py +75 -0
- bitswan-0.0.0/bspump/slack/sink.py +57 -0
- bitswan-0.0.0/bspump/socket/__init__.py +15 -0
- bitswan-0.0.0/bspump/ssh/__init__.py +7 -0
- bitswan-0.0.0/bspump/ssh/connection.py +104 -0
- bitswan-0.0.0/bspump/ssh/sink.py +158 -0
- bitswan-0.0.0/bspump/styles/input.css +3 -0
- bitswan-0.0.0/bspump/styles/tailwind.css +1120 -0
- bitswan-0.0.0/bspump/subprocess/__init__.py +3 -0
- bitswan-0.0.0/bspump/subprocess/source.py +57 -0
- bitswan-0.0.0/bspump/test/__init__.py +9 -0
- bitswan-0.0.0/bspump/test/test.py +108 -0
- bitswan-0.0.0/bspump/test-data/globscan/1 +1 -0
- bitswan-0.0.0/bspump/test-data/globscan/2 +1 -0
- bitswan-0.0.0/bspump/test-data/globscan/3 +1 -0
- bitswan-0.0.0/bspump/test-data/globscan/4-locked +1 -0
- bitswan-0.0.0/bspump/test-data/globscan/5-failed +1 -0
- bitswan-0.0.0/bspump/test-data/globscan/6-processed +1 -0
- bitswan-0.0.0/bspump/timeseries/__init__.py +3 -0
- bitswan-0.0.0/bspump/timeseries/analyzer.py +92 -0
- bitswan-0.0.0/bspump/trigger/__init__.py +15 -0
- bitswan-0.0.0/bspump/trigger/crontrig.py +55 -0
- bitswan-0.0.0/bspump/trigger/opportunistic.py +44 -0
- bitswan-0.0.0/bspump/trigger/periodic.py +31 -0
- bitswan-0.0.0/bspump/trigger/pubsub.py +22 -0
- bitswan-0.0.0/bspump/trigger/runonce.py +21 -0
- bitswan-0.0.0/bspump/trigger/trigger.py +61 -0
- bitswan-0.0.0/bspump/unittest/__init__.py +13 -0
- bitswan-0.0.0/bspump/unittest/pipeline.py +39 -0
- bitswan-0.0.0/bspump/unittest/sink.py +10 -0
- bitswan-0.0.0/bspump/unittest/source.py +18 -0
- bitswan-0.0.0/bspump/unittest/unit_test_case.py +84 -0
- bitswan-0.0.0/bspump/watch.py +51 -0
- bitswan-0.0.0/bspump/web/__init__.py +155 -0
- bitswan-0.0.0/bspump/web/static/app.html +67 -0
- bitswan-0.0.0/bspump/web/static/app.js +8 -0
- bitswan-0.0.0/bspump/zookeeper/__init__.py +3 -0
- bitswan-0.0.0/bspump/zookeeper/lookupprovider.py +36 -0
- bitswan-0.0.0/build_and_push.sh +17 -0
- bitswan-0.0.0/doc/.readthedocs.yml +22 -0
- bitswan-0.0.0/doc/mqtt-metrics-and-visibility.md +40 -0
- bitswan-0.0.0/doc/opsgenie.md +21 -0
- bitswan-0.0.0/doc/secrets.md +48 -0
- bitswan-0.0.0/docserver/Caddyfile +4 -0
- bitswan-0.0.0/docserver/Dockerfile +26 -0
- bitswan-0.0.0/docserver/build_and_push.sh +19 -0
- bitswan-0.0.0/examples/.bitswan-ignore +0 -0
- bitswan-0.0.0/examples/AutoPipeline/main.ipynb +229 -0
- bitswan-0.0.0/examples/AutoPipeline/pipelines.conf +8 -0
- bitswan-0.0.0/examples/FileField/main.ipynb +146 -0
- bitswan-0.0.0/examples/FileField/pipelines.conf +4 -0
- bitswan-0.0.0/examples/JWTWebForm/main.ipynb +100 -0
- bitswan-0.0.0/examples/JWTWebForm/pipelines.conf +8 -0
- bitswan-0.0.0/examples/Kafka2Kafka/main.ipynb +155 -0
- bitswan-0.0.0/examples/Kafka2Kafka/pipelines.conf +12 -0
- bitswan-0.0.0/examples/MemeGenerator/Dockerfile +2 -0
- bitswan-0.0.0/examples/MemeGenerator/image.jpg +0 -0
- bitswan-0.0.0/examples/MemeGenerator/main.ipynb +190 -0
- bitswan-0.0.0/examples/MemeGenerator/pipelines.conf +3 -0
- bitswan-0.0.0/examples/NestedJsonOutput/main.ipynb +171 -0
- bitswan-0.0.0/examples/NestedJsonOutput/pipelines.conf +4 -0
- bitswan-0.0.0/examples/ProtectedWebForm/main.ipynb +97 -0
- bitswan-0.0.0/examples/ProtectedWebForm/pipelines.conf +7 -0
- bitswan-0.0.0/examples/ProtectedWebRouteSource/main.ipynb +62 -0
- bitswan-0.0.0/examples/ProtectedWebRouteSource/pipelines.conf +2 -0
- bitswan-0.0.0/examples/Secrets/example-secrets-dir/bar +1 -0
- bitswan-0.0.0/examples/Secrets/example-secrets-dir/baz +1 -0
- bitswan-0.0.0/examples/Secrets/example-secrets-dir/foo +1 -0
- bitswan-0.0.0/examples/Secrets/main.ipynb +95 -0
- bitswan-0.0.0/examples/Secrets/pipelines.conf +2 -0
- bitswan-0.0.0/examples/StocksCalculator/main.ipynb +471 -0
- bitswan-0.0.0/examples/StocksCalculator/pipelines.conf +4 -0
- bitswan-0.0.0/examples/Testing/AutoPipeline/main.ipynb +132 -0
- bitswan-0.0.0/examples/Testing/AutoPipeline/pipelines.conf +8 -0
- bitswan-0.0.0/examples/Testing/ExpectError/main.ipynb +354 -0
- bitswan-0.0.0/examples/Testing/ExpectError/pipelines.conf +8 -0
- bitswan-0.0.0/examples/Testing/InspectError/main.ipynb +354 -0
- bitswan-0.0.0/examples/Testing/InspectError/pipelines.conf +8 -0
- bitswan-0.0.0/examples/Testing/MultiplePipelines/main.ipynb +354 -0
- bitswan-0.0.0/examples/Testing/MultiplePipelines/pipelines.conf +8 -0
- bitswan-0.0.0/examples/Testing/ProbeError/main.ipynb +354 -0
- bitswan-0.0.0/examples/Testing/ProbeError/pipelines.conf +8 -0
- bitswan-0.0.0/examples/Testing/main.ipynb +285 -0
- bitswan-0.0.0/examples/Testing/pipelines.conf +8 -0
- bitswan-0.0.0/examples/WebForms/main.ipynb +194 -0
- bitswan-0.0.0/examples/WebForms/pipelines.conf +3 -0
- bitswan-0.0.0/examples/WebFormsButton/main.ipynb +100 -0
- bitswan-0.0.0/examples/WebFormsButton/scripts/download_pdf.js +57 -0
- bitswan-0.0.0/examples/WebFormsButton/scripts/test_report.js +28 -0
- bitswan-0.0.0/examples/WebHooks/main.ipynb +121 -0
- bitswan-0.0.0/examples/WebHooks/pipelines.conf +16 -0
- bitswan-0.0.0/examples/WebServer/main.ipynb +63 -0
- bitswan-0.0.0/examples/WebServer/pipelines.conf +4 -0
- bitswan-0.0.0/icons/bitswan-logo.svg +47 -0
- bitswan-0.0.0/perf/README.md +4 -0
- bitswan-0.0.0/perf/data/sample-for-avro-schema.avsc +10 -0
- bitswan-0.0.0/perf/data/sample-for-avro.csv +23 -0
- bitswan-0.0.0/perf/elasticsearch/README.md +18 -0
- bitswan-0.0.0/perf/elasticsearch/perf-baseline-sink.py +53 -0
- bitswan-0.0.0/perf/elasticsearch/perf-es-sink.py +57 -0
- bitswan-0.0.0/pre/entrypoint.sh +10 -0
- bitswan-0.0.0/pyproject.toml +94 -0
- bitswan-0.0.0/pytest.ini +3 -0
- bitswan-0.0.0/shell.nix +22 -0
- bitswan-0.0.0/tailwind.config.js +17 -0
- bitswan-0.0.0/test/__init__.py +11 -0
- bitswan-0.0.0/test/analyzer/__init__.py +6 -0
- bitswan-0.0.0/test/analyzer/test_analyzer.py +24 -0
- bitswan-0.0.0/test/analyzer/test_geoanalyzer.py +20 -0
- bitswan-0.0.0/test/analyzer/test_latch.py +94 -0
- bitswan-0.0.0/test/analyzer/test_sessionanalyzer.py +22 -0
- bitswan-0.0.0/test/analyzer/test_timedriftanalyzer.py +21 -0
- bitswan-0.0.0/test/analyzer/test_timewindowanalyzer.py +22 -0
- bitswan-0.0.0/test/common/__init__.py +14 -0
- bitswan-0.0.0/test/common/test_aggregator.py +112 -0
- bitswan-0.0.0/test/common/test_bytes.py +64 -0
- bitswan-0.0.0/test/common/test_flatten.py +43 -0
- bitswan-0.0.0/test/common/test_hexlify.py +20 -0
- bitswan-0.0.0/test/common/test_iterator.py +45 -0
- bitswan-0.0.0/test/common/test_json.py +63 -0
- bitswan-0.0.0/test/common/test_mapping.py +104 -0
- bitswan-0.0.0/test/common/test_null.py +15 -0
- bitswan-0.0.0/test/common/test_print.py +109 -0
- bitswan-0.0.0/test/common/test_time.py +38 -0
- bitswan-0.0.0/test/crypto/__init__.py +2 -0
- bitswan-0.0.0/test/crypto/test_aes.py +45 -0
- bitswan-0.0.0/test/crypto/test_hashing.py +198 -0
- bitswan-0.0.0/test/declarative/__init__.py +11 -0
- bitswan-0.0.0/test/declarative/test_add_01.yaml +4 -0
- bitswan-0.0.0/test/declarative/test_add_02.yaml +5 -0
- bitswan-0.0.0/test/declarative/test_and_01.yaml +8 -0
- bitswan-0.0.0/test/declarative/test_config_01.yaml +5 -0
- bitswan-0.0.0/test/declarative/test_datetime_add.yaml +6 -0
- bitswan-0.0.0/test/declarative/test_datetime_parse_fail.yaml +6 -0
- bitswan-0.0.0/test/declarative/test_datetime_parse_set_year.yaml +5 -0
- bitswan-0.0.0/test/declarative/test_datetime_parse_timezone.yaml +5 -0
- bitswan-0.0.0/test/declarative/test_datetime_parse_tz.yaml +4 -0
- bitswan-0.0.0/test/declarative/test_declarative_add.py +34 -0
- bitswan-0.0.0/test/declarative/test_declarative_and.py +20 -0
- bitswan-0.0.0/test/declarative/test_declarative_config.py +23 -0
- bitswan-0.0.0/test/declarative/test_declarative_datetime.py +56 -0
- bitswan-0.0.0/test/declarative/test_declarative_dict.py +53 -0
- bitswan-0.0.0/test/declarative/test_declarative_dict_parse.py +54 -0
- bitswan-0.0.0/test/declarative/test_declarative_join.py +37 -0
- bitswan-0.0.0/test/declarative/test_declarative_nested_expression.py +71 -0
- bitswan-0.0.0/test/declarative/test_declarative_nested_expression.yaml +36 -0
- bitswan-0.0.0/test/declarative/test_declarative_regex.py +59 -0
- bitswan-0.0.0/test/declarative/test_declarative_time.py +25 -0
- bitswan-0.0.0/test/declarative/test_declarative_when.py +35 -0
- bitswan-0.0.0/test/declarative/test_dict_01.yaml +6 -0
- bitswan-0.0.0/test/declarative/test_dict_02.yaml +6 -0
- bitswan-0.0.0/test/declarative/test_dict_parse_kvdqs_01.yaml +4 -0
- bitswan-0.0.0/test/declarative/test_dict_parse_kvs_01.yaml +4 -0
- bitswan-0.0.0/test/declarative/test_dict_parse_qs_01.yaml +4 -0
- bitswan-0.0.0/test/declarative/test_join_01.yaml +9 -0
- bitswan-0.0.0/test/declarative/test_join_02.yaml +10 -0
- bitswan-0.0.0/test/declarative/test_now.yaml +2 -0
- bitswan-0.0.0/test/declarative/test_regex_parse_01.yaml +22 -0
- bitswan-0.0.0/test/declarative/test_regex_parse_02.yaml +24 -0
- bitswan-0.0.0/test/declarative/test_when.yaml +34 -0
- bitswan-0.0.0/test/file/__init__.py +1 -0
- bitswan-0.0.0/test/file/test_fileblocksink.py +24 -0
- bitswan-0.0.0/test/filter/__init__.py +3 -0
- bitswan-0.0.0/test/filter/test_attributefilter.py +74 -0
- bitswan-0.0.0/test/filter/test_contentfilter.py +60 -0
- bitswan-0.0.0/test/filter/test_timedriftfilter.py +28 -0
- bitswan-0.0.0/test/influxdb/__init__.py +1 -0
- bitswan-0.0.0/test/influxdb/test_influxdbsink.py +42 -0
- bitswan-0.0.0/test/integrity/__init__.py +1 -0
- bitswan-0.0.0/test/integrity/test_integrity.py +53 -0
- bitswan-0.0.0/test/jupyter/__init__.py +1 -0
- bitswan-0.0.0/test/jupyter/expected.py +40 -0
- bitswan-0.0.0/test/jupyter/parse_example.ipynb +135 -0
- bitswan-0.0.0/test/jupyter/test_jupyter.py +28 -0
- bitswan-0.0.0/test/kafka/__init__.py +1 -0
- bitswan-0.0.0/test/kafka/test_kafkasink.py +57 -0
- bitswan-0.0.0/test/matrix/__init__.py +5 -0
- bitswan-0.0.0/test/matrix/test_geo_matrix.py +68 -0
- bitswan-0.0.0/test/matrix/test_matrix.py +81 -0
- bitswan-0.0.0/test/matrix/test_named_matrix.py +83 -0
- bitswan-0.0.0/test/matrix/test_session_matrix.py +83 -0
- bitswan-0.0.0/test/matrix/test_time_window_matrix.py +96 -0
- bitswan-0.0.0/test/test_config_defaults.py +27 -0
- bitswan-0.0.0/test/test_metrics_service.py +63 -0
|
@@ -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
|
bitswan-0.0.0/.gitignore
ADDED
|
@@ -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'
|
bitswan-0.0.0/Dockerfile
ADDED
|
@@ -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.
|
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
|
+
|
bitswan-0.0.0/README.md
ADDED
|
@@ -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
|
+
|