bitswan 2024.4__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-2024.4/.coveragerc +5 -0
- bitswan-2024.4/.github/workflows/docker-publish.yml +31 -0
- bitswan-2024.4/.github/workflows/test.yml +36 -0
- bitswan-2024.4/.gitignore +118 -0
- bitswan-2024.4/.gitlab-ci.yml +23 -0
- bitswan-2024.4/Dockerfile +40 -0
- bitswan-2024.4/LICENSE +29 -0
- bitswan-2024.4/MANIFEST.in +1 -0
- bitswan-2024.4/PKG-INFO +148 -0
- bitswan-2024.4/README.md +70 -0
- bitswan-2024.4/bitswan/__init__.py +54 -0
- bitswan-2024.4/bitswan/__main__.py +4 -0
- bitswan-2024.4/bitswan/__version__.py +12 -0
- bitswan-2024.4/bitswan/abc/__init__.py +0 -0
- bitswan-2024.4/bitswan/abc/anomaly.py +41 -0
- bitswan-2024.4/bitswan/abc/connection.py +71 -0
- bitswan-2024.4/bitswan/abc/generator.py +81 -0
- bitswan-2024.4/bitswan/abc/lookup.py +307 -0
- bitswan-2024.4/bitswan/abc/lookupprovider.py +46 -0
- bitswan-2024.4/bitswan/abc/processor.py +136 -0
- bitswan-2024.4/bitswan/abc/sink.py +12 -0
- bitswan-2024.4/bitswan/abc/source.py +356 -0
- bitswan-2024.4/bitswan/aggregation/__init__.py +5 -0
- bitswan-2024.4/bitswan/aggregation/hyperloglog.py +125 -0
- bitswan-2024.4/bitswan/aio/__init__.py +6 -0
- bitswan-2024.4/bitswan/aio/sink.py +70 -0
- bitswan-2024.4/bitswan/amqp/__init__.py +10 -0
- bitswan-2024.4/bitswan/amqp/connection.py +73 -0
- bitswan-2024.4/bitswan/amqp/sink.py +79 -0
- bitswan-2024.4/bitswan/amqp/source.py +144 -0
- bitswan-2024.4/bitswan/analyzer/__init__.py +20 -0
- bitswan-2024.4/bitswan/analyzer/analyzer.py +112 -0
- bitswan-2024.4/bitswan/analyzer/analyzingsource.py +49 -0
- bitswan-2024.4/bitswan/analyzer/geoanalyzer.py +98 -0
- bitswan-2024.4/bitswan/analyzer/latch.py +117 -0
- bitswan-2024.4/bitswan/analyzer/sessionanalyzer.py +102 -0
- bitswan-2024.4/bitswan/analyzer/threshold.py +208 -0
- bitswan-2024.4/bitswan/analyzer/timedriftanalyzer.py +164 -0
- bitswan-2024.4/bitswan/analyzer/timewindowanalyzer.py +83 -0
- bitswan-2024.4/bitswan/anomaly/__init__.py +12 -0
- bitswan-2024.4/bitswan/anomaly/analyzer.py +100 -0
- bitswan-2024.4/bitswan/anomaly/generalanomaly.py +57 -0
- bitswan-2024.4/bitswan/anomaly/manager.py +117 -0
- bitswan-2024.4/bitswan/anomaly/storage.py +219 -0
- bitswan-2024.4/bitswan/application.py +146 -0
- bitswan-2024.4/bitswan/asab/__init__.py +50 -0
- bitswan-2024.4/bitswan/asab/__version__.py +12 -0
- bitswan-2024.4/bitswan/asab/abc/__init__.py +9 -0
- bitswan-2024.4/bitswan/asab/abc/module.py +75 -0
- bitswan-2024.4/bitswan/asab/abc/service.py +81 -0
- bitswan-2024.4/bitswan/asab/abc/singleton.py +24 -0
- bitswan-2024.4/bitswan/asab/alert.py +258 -0
- bitswan-2024.4/bitswan/asab/api/__init__.py +5 -0
- bitswan-2024.4/bitswan/asab/api/discovery.py +179 -0
- bitswan-2024.4/bitswan/asab/api/doc.py +366 -0
- bitswan-2024.4/bitswan/asab/api/doc_templates.py +109 -0
- bitswan-2024.4/bitswan/asab/api/log.py +161 -0
- bitswan-2024.4/bitswan/asab/api/service.py +235 -0
- bitswan-2024.4/bitswan/asab/api/web_handler.py +127 -0
- bitswan-2024.4/bitswan/asab/application.py +869 -0
- bitswan-2024.4/bitswan/asab/config.py +566 -0
- bitswan-2024.4/bitswan/asab/exceptions.py +54 -0
- bitswan-2024.4/bitswan/asab/library/__init__.py +16 -0
- bitswan-2024.4/bitswan/asab/library/dirsync.py +63 -0
- bitswan-2024.4/bitswan/asab/library/item.py +23 -0
- bitswan-2024.4/bitswan/asab/library/providers/__init__.py +0 -0
- bitswan-2024.4/bitswan/asab/library/providers/abc.py +49 -0
- bitswan-2024.4/bitswan/asab/library/providers/azurestorage.py +256 -0
- bitswan-2024.4/bitswan/asab/library/providers/filesystem.py +221 -0
- bitswan-2024.4/bitswan/asab/library/providers/filesystem_inotify.py +53 -0
- bitswan-2024.4/bitswan/asab/library/providers/git.py +217 -0
- bitswan-2024.4/bitswan/asab/library/providers/libsreg.py +176 -0
- bitswan-2024.4/bitswan/asab/library/providers/zookeeper.py +366 -0
- bitswan-2024.4/bitswan/asab/library/service.py +496 -0
- bitswan-2024.4/bitswan/asab/log.py +617 -0
- bitswan-2024.4/bitswan/asab/metrics/__init__.py +43 -0
- bitswan-2024.4/bitswan/asab/metrics/http.py +29 -0
- bitswan-2024.4/bitswan/asab/metrics/influxdb.py +308 -0
- bitswan-2024.4/bitswan/asab/metrics/metrics.py +606 -0
- bitswan-2024.4/bitswan/asab/metrics/native.py +66 -0
- bitswan-2024.4/bitswan/asab/metrics/openmetric.py +165 -0
- bitswan-2024.4/bitswan/asab/metrics/service.py +411 -0
- bitswan-2024.4/bitswan/asab/metrics/storage.py +48 -0
- bitswan-2024.4/bitswan/asab/metrics/web_handler.py +292 -0
- bitswan-2024.4/bitswan/asab/pdict.py +93 -0
- bitswan-2024.4/bitswan/asab/proactor/__init__.py +32 -0
- bitswan-2024.4/bitswan/asab/proactor/service.py +47 -0
- bitswan-2024.4/bitswan/asab/pubsub.py +357 -0
- bitswan-2024.4/bitswan/asab/sentry/__init__.py +15 -0
- bitswan-2024.4/bitswan/asab/sentry/service.py +300 -0
- bitswan-2024.4/bitswan/asab/socket.py +38 -0
- bitswan-2024.4/bitswan/asab/storage/__init__.py +39 -0
- bitswan-2024.4/bitswan/asab/storage/elasticsearch.py +621 -0
- bitswan-2024.4/bitswan/asab/storage/exceptions.py +9 -0
- bitswan-2024.4/bitswan/asab/storage/inmemory.py +151 -0
- bitswan-2024.4/bitswan/asab/storage/mongodb.py +211 -0
- bitswan-2024.4/bitswan/asab/storage/service.py +233 -0
- bitswan-2024.4/bitswan/asab/storage/upsertor.py +177 -0
- bitswan-2024.4/bitswan/asab/task.py +142 -0
- bitswan-2024.4/bitswan/asab/timer.py +97 -0
- bitswan-2024.4/bitswan/asab/tls.py +104 -0
- bitswan-2024.4/bitswan/asab/utils.py +205 -0
- bitswan-2024.4/bitswan/asab/web/__init__.py +63 -0
- bitswan-2024.4/bitswan/asab/web/accesslog.py +54 -0
- bitswan-2024.4/bitswan/asab/web/auth/__init__.py +8 -0
- bitswan-2024.4/bitswan/asab/web/auth/decorator.py +82 -0
- bitswan-2024.4/bitswan/asab/web/auth/service.py +607 -0
- bitswan-2024.4/bitswan/asab/web/authz/__init__.py +12 -0
- bitswan-2024.4/bitswan/asab/web/authz/decorator.py +118 -0
- bitswan-2024.4/bitswan/asab/web/authz/middleware.py +19 -0
- bitswan-2024.4/bitswan/asab/web/authz/service.py +228 -0
- bitswan-2024.4/bitswan/asab/web/container.py +238 -0
- bitswan-2024.4/bitswan/asab/web/metrics.py +51 -0
- bitswan-2024.4/bitswan/asab/web/rest/__init__.py +8 -0
- bitswan-2024.4/bitswan/asab/web/rest/json.py +329 -0
- bitswan-2024.4/bitswan/asab/web/service.py +88 -0
- bitswan-2024.4/bitswan/asab/web/session/__init__.py +54 -0
- bitswan-2024.4/bitswan/asab/web/session/cookies.py +37 -0
- bitswan-2024.4/bitswan/asab/web/session/inmemstor.py +60 -0
- bitswan-2024.4/bitswan/asab/web/session/session.py +81 -0
- bitswan-2024.4/bitswan/asab/web/session/storage.py +40 -0
- bitswan-2024.4/bitswan/asab/web/staticdir.py +33 -0
- bitswan-2024.4/bitswan/asab/web/tenant/__init__.py +9 -0
- bitswan-2024.4/bitswan/asab/web/tenant/midleware.py +44 -0
- bitswan-2024.4/bitswan/asab/web/tenant/service.py +93 -0
- bitswan-2024.4/bitswan/asab/web/tenant/web.py +13 -0
- bitswan-2024.4/bitswan/asab/web/webcrypto.py +103 -0
- bitswan-2024.4/bitswan/asab/web/websocket.py +156 -0
- bitswan-2024.4/bitswan/asab/zookeeper/__init__.py +17 -0
- bitswan-2024.4/bitswan/asab/zookeeper/container.py +259 -0
- bitswan-2024.4/bitswan/asab/zookeeper/service.py +28 -0
- bitswan-2024.4/bitswan/asab/zookeeper/wrapper.py +110 -0
- bitswan-2024.4/bitswan/avro/__init__.py +11 -0
- bitswan-2024.4/bitswan/avro/deserializer.py +34 -0
- bitswan-2024.4/bitswan/avro/loader.py +28 -0
- bitswan-2024.4/bitswan/avro/serializer.py +56 -0
- bitswan-2024.4/bitswan/avro/sink.py +140 -0
- bitswan-2024.4/bitswan/avro/source.py +34 -0
- bitswan-2024.4/bitswan/cache/__init__.py +7 -0
- bitswan-2024.4/bitswan/cache/cachedict.py +2 -0
- bitswan-2024.4/bitswan/cache/lrucachedict.py +58 -0
- bitswan-2024.4/bitswan/common/__init__.py +76 -0
- bitswan-2024.4/bitswan/common/aggregator.py +339 -0
- bitswan-2024.4/bitswan/common/bytes.py +74 -0
- bitswan-2024.4/bitswan/common/flatten.py +100 -0
- bitswan-2024.4/bitswan/common/hexlify.py +23 -0
- bitswan-2024.4/bitswan/common/iterator.py +57 -0
- bitswan-2024.4/bitswan/common/jq.py +77 -0
- bitswan-2024.4/bitswan/common/json.py +78 -0
- bitswan-2024.4/bitswan/common/jsonbytes.py +27 -0
- bitswan-2024.4/bitswan/common/mapping.py +119 -0
- bitswan-2024.4/bitswan/common/null.py +19 -0
- bitswan-2024.4/bitswan/common/print.py +182 -0
- bitswan-2024.4/bitswan/common/routing.py +404 -0
- bitswan-2024.4/bitswan/common/tee.py +161 -0
- bitswan-2024.4/bitswan/common/time.py +57 -0
- bitswan-2024.4/bitswan/common/transfr.py +61 -0
- bitswan-2024.4/bitswan/crypto/__init__.py +17 -0
- bitswan-2024.4/bitswan/crypto/aes.py +47 -0
- bitswan-2024.4/bitswan/crypto/hashing.py +73 -0
- bitswan-2024.4/bitswan/declarative/__init__.py +39 -0
- bitswan-2024.4/bitswan/declarative/abc.py +154 -0
- bitswan-2024.4/bitswan/declarative/builder.py +334 -0
- bitswan-2024.4/bitswan/declarative/declerror.py +16 -0
- bitswan-2024.4/bitswan/declarative/dot.py +68 -0
- bitswan-2024.4/bitswan/declarative/expression/__init__.py +157 -0
- bitswan-2024.4/bitswan/declarative/expression/arithmetic.py +214 -0
- bitswan-2024.4/bitswan/declarative/expression/comparison.py +264 -0
- bitswan-2024.4/bitswan/declarative/expression/datastructs/__init__.py +0 -0
- bitswan-2024.4/bitswan/declarative/expression/datastructs/dict_parse.py +122 -0
- bitswan-2024.4/bitswan/declarative/expression/datastructs/dictexpr.py +208 -0
- bitswan-2024.4/bitswan/declarative/expression/datastructs/itemexpr.py +212 -0
- bitswan-2024.4/bitswan/declarative/expression/datastructs/listexpr.py +31 -0
- bitswan-2024.4/bitswan/declarative/expression/datastructs/tupleexpr.py +12 -0
- bitswan-2024.4/bitswan/declarative/expression/datetime/__init__.py +0 -0
- bitswan-2024.4/bitswan/declarative/expression/datetime/dtformat.py +53 -0
- bitswan-2024.4/bitswan/declarative/expression/datetime/dtget.py +72 -0
- bitswan-2024.4/bitswan/declarative/expression/datetime/dtparse.py +80 -0
- bitswan-2024.4/bitswan/declarative/expression/datetime/nowexpr.py +33 -0
- bitswan-2024.4/bitswan/declarative/expression/ip/__init__.py +0 -0
- bitswan-2024.4/bitswan/declarative/expression/ip/insubnetexpr.py +50 -0
- bitswan-2024.4/bitswan/declarative/expression/ip/ipformatexpr.py +42 -0
- bitswan-2024.4/bitswan/declarative/expression/ip/ipparseexpr.py +32 -0
- bitswan-2024.4/bitswan/declarative/expression/logical.py +89 -0
- bitswan-2024.4/bitswan/declarative/expression/lookup/__init__.py +0 -0
- bitswan-2024.4/bitswan/declarative/expression/lookup/lookupexpr.py +48 -0
- bitswan-2024.4/bitswan/declarative/expression/statement/__init__.py +0 -0
- bitswan-2024.4/bitswan/declarative/expression/statement/firstexpr.py +11 -0
- bitswan-2024.4/bitswan/declarative/expression/statement/forexpr.py +21 -0
- bitswan-2024.4/bitswan/declarative/expression/statement/funexpr.py +30 -0
- bitswan-2024.4/bitswan/declarative/expression/statement/ifexpr.py +52 -0
- bitswan-2024.4/bitswan/declarative/expression/statement/selfexpr.py +31 -0
- bitswan-2024.4/bitswan/declarative/expression/statement/whenexpr.py +109 -0
- bitswan-2024.4/bitswan/declarative/expression/string/__init__.py +0 -0
- bitswan-2024.4/bitswan/declarative/expression/string/contains.py +34 -0
- bitswan-2024.4/bitswan/declarative/expression/string/cutexpr.py +51 -0
- bitswan-2024.4/bitswan/declarative/expression/string/endswith.py +34 -0
- bitswan-2024.4/bitswan/declarative/expression/string/joinexpr.py +78 -0
- bitswan-2024.4/bitswan/declarative/expression/string/lowerexpr.py +25 -0
- bitswan-2024.4/bitswan/declarative/expression/string/regex.py +270 -0
- bitswan-2024.4/bitswan/declarative/expression/string/split.py +41 -0
- bitswan-2024.4/bitswan/declarative/expression/string/startswith.py +38 -0
- bitswan-2024.4/bitswan/declarative/expression/string/substringexpr.py +48 -0
- bitswan-2024.4/bitswan/declarative/expression/string/upperexpr.py +25 -0
- bitswan-2024.4/bitswan/declarative/expression/test/__init__.py +0 -0
- bitswan-2024.4/bitswan/declarative/expression/test/inexpr.py +112 -0
- bitswan-2024.4/bitswan/declarative/expression/utility/__init__.py +0 -0
- bitswan-2024.4/bitswan/declarative/expression/utility/castexpr.py +90 -0
- bitswan-2024.4/bitswan/declarative/expression/utility/context.py +80 -0
- bitswan-2024.4/bitswan/declarative/expression/utility/debugexpr.py +25 -0
- bitswan-2024.4/bitswan/declarative/expression/utility/hashexpr.py +92 -0
- bitswan-2024.4/bitswan/declarative/expression/utility/mapexpr.py +66 -0
- bitswan-2024.4/bitswan/declarative/expression/value/__init__.py +0 -0
- bitswan-2024.4/bitswan/declarative/expression/value/eventexpr.py +94 -0
- bitswan-2024.4/bitswan/declarative/expression/value/valueexpr.py +27 -0
- bitswan-2024.4/bitswan/declarative/generator.py +51 -0
- bitswan-2024.4/bitswan/declarative/optimizer.py +65 -0
- bitswan-2024.4/bitswan/declarative/processor.py +34 -0
- bitswan-2024.4/bitswan/declarative/segmentbuilder.py +159 -0
- bitswan-2024.4/bitswan/declarative/timewindowanalyzer.py +115 -0
- bitswan-2024.4/bitswan/elasticsearch/__init__.py +12 -0
- bitswan-2024.4/bitswan/elasticsearch/connection.py +560 -0
- bitswan-2024.4/bitswan/elasticsearch/data_feeder.py +107 -0
- bitswan-2024.4/bitswan/elasticsearch/lookup.py +307 -0
- bitswan-2024.4/bitswan/elasticsearch/sink.py +153 -0
- bitswan-2024.4/bitswan/elasticsearch/source.py +241 -0
- bitswan-2024.4/bitswan/exception.py +6 -0
- bitswan-2024.4/bitswan/file/__init__.py +19 -0
- bitswan-2024.4/bitswan/file/fileabcsource.py +384 -0
- bitswan-2024.4/bitswan/file/fileblocksink.py +93 -0
- bitswan-2024.4/bitswan/file/fileblocksource.py +59 -0
- bitswan-2024.4/bitswan/file/filecsvsink.py +146 -0
- bitswan-2024.4/bitswan/file/filecsvsource.py +103 -0
- bitswan-2024.4/bitswan/file/filejsonsource.py +52 -0
- bitswan-2024.4/bitswan/file/filelinesource.py +133 -0
- bitswan-2024.4/bitswan/file/globscan.py +127 -0
- bitswan-2024.4/bitswan/file/lookupprovider.py +75 -0
- bitswan-2024.4/bitswan/fileloader.py +25 -0
- bitswan-2024.4/bitswan/filter/__init__.py +9 -0
- bitswan-2024.4/bitswan/filter/attributefilter.py +49 -0
- bitswan-2024.4/bitswan/filter/contentfilter.py +64 -0
- bitswan-2024.4/bitswan/filter/timedriftfilter.py +53 -0
- bitswan-2024.4/bitswan/ftp/__init__.py +7 -0
- bitswan-2024.4/bitswan/ftp/connection.py +59 -0
- bitswan-2024.4/bitswan/ftp/source.py +132 -0
- bitswan-2024.4/bitswan/googledrive/__init__.py +10 -0
- bitswan-2024.4/bitswan/googledrive/abcsink.py +72 -0
- bitswan-2024.4/bitswan/googledrive/blocksink.py +61 -0
- bitswan-2024.4/bitswan/googledrive/connection.py +70 -0
- bitswan-2024.4/bitswan/http/__init__.py +19 -0
- bitswan-2024.4/bitswan/http/client/__init__.py +0 -0
- bitswan-2024.4/bitswan/http/client/abcsource.py +100 -0
- bitswan-2024.4/bitswan/http/client/source.py +32 -0
- bitswan-2024.4/bitswan/http/client/wssink.py +130 -0
- bitswan-2024.4/bitswan/http/lookupprovider.py +152 -0
- bitswan-2024.4/bitswan/http/web/__init__.py +0 -0
- bitswan-2024.4/bitswan/http/web/server.py +586 -0
- bitswan-2024.4/bitswan/http/web/sink.py +93 -0
- bitswan-2024.4/bitswan/http/web/source.py +137 -0
- bitswan-2024.4/bitswan/http/web/wssource.py +57 -0
- bitswan-2024.4/bitswan/influxdb/__init__.py +7 -0
- bitswan-2024.4/bitswan/influxdb/connection.py +218 -0
- bitswan-2024.4/bitswan/influxdb/sink.py +99 -0
- bitswan-2024.4/bitswan/integrity/__init__.py +5 -0
- bitswan-2024.4/bitswan/integrity/integrityenricher.py +77 -0
- bitswan-2024.4/bitswan/ipc/__init__.py +19 -0
- bitswan-2024.4/bitswan/ipc/datagram.py +171 -0
- bitswan-2024.4/bitswan/ipc/protocol.py +115 -0
- bitswan-2024.4/bitswan/ipc/stream.py +166 -0
- bitswan-2024.4/bitswan/ipc/stream_client_sink.py +195 -0
- bitswan-2024.4/bitswan/ipc/stream_server_source.py +228 -0
- bitswan-2024.4/bitswan/jupyter/__init__.py +49 -0
- bitswan-2024.4/bitswan/jupyter/jupyter.py +648 -0
- bitswan-2024.4/bitswan/kafka/__init__.py +13 -0
- bitswan-2024.4/bitswan/kafka/batchsink.py +113 -0
- bitswan-2024.4/bitswan/kafka/connection.py +36 -0
- bitswan-2024.4/bitswan/kafka/keyfilter.py +53 -0
- bitswan-2024.4/bitswan/kafka/sink.py +128 -0
- bitswan-2024.4/bitswan/kafka/source.py +181 -0
- bitswan-2024.4/bitswan/kafka/topic_initializer.py +324 -0
- bitswan-2024.4/bitswan/ldap/__init__.py +7 -0
- bitswan-2024.4/bitswan/ldap/connection.py +110 -0
- bitswan-2024.4/bitswan/ldap/source.py +94 -0
- bitswan-2024.4/bitswan/lookup/__init__.py +12 -0
- bitswan-2024.4/bitswan/lookup/index.py +312 -0
- bitswan-2024.4/bitswan/lookup/ipgeolookup.py +155 -0
- bitswan-2024.4/bitswan/lookup/matrixlookup.py +110 -0
- bitswan-2024.4/bitswan/lookup/memcachedlookup.py +51 -0
- bitswan-2024.4/bitswan/mail/__init__.py +8 -0
- bitswan-2024.4/bitswan/mail/smtpconnection.py +111 -0
- bitswan-2024.4/bitswan/mail/smtpsink.py +25 -0
- bitswan-2024.4/bitswan/main.py +99 -0
- bitswan-2024.4/bitswan/matrix/__init__.py +26 -0
- bitswan-2024.4/bitswan/matrix/geomatrix.py +260 -0
- bitswan-2024.4/bitswan/matrix/matrix.py +247 -0
- bitswan-2024.4/bitswan/matrix/matrixexportcsvgenerator.py +70 -0
- bitswan-2024.4/bitswan/matrix/namedmatrix.py +165 -0
- bitswan-2024.4/bitswan/matrix/sessionmatrix.py +106 -0
- bitswan-2024.4/bitswan/matrix/source.py +19 -0
- bitswan-2024.4/bitswan/matrix/timewindowmatrix.py +482 -0
- bitswan-2024.4/bitswan/matrix/utils/__init__.py +16 -0
- bitswan-2024.4/bitswan/matrix/utils/closedrows.py +87 -0
- bitswan-2024.4/bitswan/matrix/utils/index.py +109 -0
- bitswan-2024.4/bitswan/matrix/utils/timeconfig.py +56 -0
- bitswan-2024.4/bitswan/matrix/utils/warmingupcount.py +60 -0
- bitswan-2024.4/bitswan/model/__init__.py +3 -0
- bitswan-2024.4/bitswan/model/model.py +61 -0
- bitswan-2024.4/bitswan/mongodb/__init__.py +13 -0
- bitswan-2024.4/bitswan/mongodb/changestreamsource.py +75 -0
- bitswan-2024.4/bitswan/mongodb/connection.py +95 -0
- bitswan-2024.4/bitswan/mongodb/lookup.py +212 -0
- bitswan-2024.4/bitswan/mongodb/sink.py +118 -0
- bitswan-2024.4/bitswan/mongodb/source.py +67 -0
- bitswan-2024.4/bitswan/mqtt/__init__.py +6 -0
- bitswan-2024.4/bitswan/mqtt/connection.py +63 -0
- bitswan-2024.4/bitswan/mqtt/service.py +221 -0
- bitswan-2024.4/bitswan/mqtt/sink.py +19 -0
- bitswan-2024.4/bitswan/mqtt/source.py +35 -0
- bitswan-2024.4/bitswan/mysql/__init__.py +12 -0
- bitswan-2024.4/bitswan/mysql/binlogsource.py +244 -0
- bitswan-2024.4/bitswan/mysql/connection.py +356 -0
- bitswan-2024.4/bitswan/mysql/convertors.py +32 -0
- bitswan-2024.4/bitswan/mysql/lookup.py +180 -0
- bitswan-2024.4/bitswan/mysql/sink.py +36 -0
- bitswan-2024.4/bitswan/mysql/source.py +56 -0
- bitswan-2024.4/bitswan/odbc/__init__.py +9 -0
- bitswan-2024.4/bitswan/odbc/connection.py +174 -0
- bitswan-2024.4/bitswan/odbc/sink.py +36 -0
- bitswan-2024.4/bitswan/odbc/source.py +36 -0
- bitswan-2024.4/bitswan/parquet/__init__.py +3 -0
- bitswan-2024.4/bitswan/parquet/sink.py +264 -0
- bitswan-2024.4/bitswan/pipeline.py +1025 -0
- bitswan-2024.4/bitswan/postgresql/__init__.py +13 -0
- bitswan-2024.4/bitswan/postgresql/connection.py +292 -0
- bitswan-2024.4/bitswan/postgresql/logicalreplicationsource.py +113 -0
- bitswan-2024.4/bitswan/postgresql/lookup.py +182 -0
- bitswan-2024.4/bitswan/postgresql/sink.py +36 -0
- bitswan-2024.4/bitswan/postgresql/source.py +52 -0
- bitswan-2024.4/bitswan/pumpbuilder.py +274 -0
- bitswan-2024.4/bitswan/random/__init__.py +10 -0
- bitswan-2024.4/bitswan/random/randomdrop.py +21 -0
- bitswan-2024.4/bitswan/random/randomenricher.py +41 -0
- bitswan-2024.4/bitswan/random/source.py +71 -0
- bitswan-2024.4/bitswan/service.py +374 -0
- bitswan-2024.4/bitswan/slack/__init__.py +10 -0
- bitswan-2024.4/bitswan/slack/connection.py +75 -0
- bitswan-2024.4/bitswan/slack/sink.py +57 -0
- bitswan-2024.4/bitswan/socket/__init__.py +15 -0
- bitswan-2024.4/bitswan/ssh/__init__.py +7 -0
- bitswan-2024.4/bitswan/ssh/connection.py +104 -0
- bitswan-2024.4/bitswan/ssh/sink.py +158 -0
- bitswan-2024.4/bitswan/subprocess/__init__.py +3 -0
- bitswan-2024.4/bitswan/subprocess/source.py +57 -0
- bitswan-2024.4/bitswan/test/__init__.py +9 -0
- bitswan-2024.4/bitswan/test/test.py +108 -0
- bitswan-2024.4/bitswan/test-data/globscan/1 +1 -0
- bitswan-2024.4/bitswan/test-data/globscan/2 +1 -0
- bitswan-2024.4/bitswan/test-data/globscan/3 +1 -0
- bitswan-2024.4/bitswan/test-data/globscan/4-locked +1 -0
- bitswan-2024.4/bitswan/test-data/globscan/5-failed +1 -0
- bitswan-2024.4/bitswan/test-data/globscan/6-processed +1 -0
- bitswan-2024.4/bitswan/timeseries/__init__.py +3 -0
- bitswan-2024.4/bitswan/timeseries/analyzer.py +92 -0
- bitswan-2024.4/bitswan/trigger/__init__.py +15 -0
- bitswan-2024.4/bitswan/trigger/crontrig.py +55 -0
- bitswan-2024.4/bitswan/trigger/opportunistic.py +44 -0
- bitswan-2024.4/bitswan/trigger/periodic.py +31 -0
- bitswan-2024.4/bitswan/trigger/pubsub.py +22 -0
- bitswan-2024.4/bitswan/trigger/runonce.py +21 -0
- bitswan-2024.4/bitswan/trigger/trigger.py +61 -0
- bitswan-2024.4/bitswan/unittest/__init__.py +13 -0
- bitswan-2024.4/bitswan/unittest/pipeline.py +39 -0
- bitswan-2024.4/bitswan/unittest/sink.py +10 -0
- bitswan-2024.4/bitswan/unittest/source.py +18 -0
- bitswan-2024.4/bitswan/unittest/unit_test_case.py +84 -0
- bitswan-2024.4/bitswan/watch.py +51 -0
- bitswan-2024.4/bitswan/web/__init__.py +155 -0
- bitswan-2024.4/bitswan/web/static/app.html +67 -0
- bitswan-2024.4/bitswan/web/static/app.js +8 -0
- bitswan-2024.4/bitswan/zookeeper/__init__.py +3 -0
- bitswan-2024.4/bitswan/zookeeper/lookupprovider.py +36 -0
- bitswan-2024.4/build_and_push.sh +17 -0
- bitswan-2024.4/doc/.readthedocs.yml +22 -0
- bitswan-2024.4/doc/mqtt-metrics-and-visibility.md +40 -0
- bitswan-2024.4/doc/opsgenie.md +21 -0
- bitswan-2024.4/doc/secrets.md +48 -0
- bitswan-2024.4/examples/Advanced/bspump-aggregator.py +54 -0
- bitswan-2024.4/examples/Advanced/bspump-amqp.py +48 -0
- bitswan-2024.4/examples/Advanced/bspump-analyzing-source.py +94 -0
- bitswan-2024.4/examples/Advanced/bspump-anomaly.py +267 -0
- bitswan-2024.4/examples/Advanced/bspump-avro-serialization.py +69 -0
- bitswan-2024.4/examples/Advanced/bspump-avro-sink.py +69 -0
- bitswan-2024.4/examples/Advanced/bspump-avro-source.py +43 -0
- bitswan-2024.4/examples/Advanced/bspump-catch-error.py +40 -0
- bitswan-2024.4/examples/Advanced/bspump-coindesk.py +64 -0
- bitswan-2024.4/examples/Advanced/bspump-content-filter.py +69 -0
- bitswan-2024.4/examples/Advanced/bspump-csv-tableau-export.py +167 -0
- bitswan-2024.4/examples/Advanced/bspump-csv.py +52 -0
- bitswan-2024.4/examples/Advanced/bspump-csvsink-periodic.py +72 -0
- bitswan-2024.4/examples/Advanced/bspump-cysimdjson-parser.py +60 -0
- bitswan-2024.4/examples/Advanced/bspump-declarative-parser.py +49 -0
- bitswan-2024.4/examples/Advanced/bspump-declarative-twa.py +65 -0
- bitswan-2024.4/examples/Advanced/bspump-declarative.py +82 -0
- bitswan-2024.4/examples/Advanced/bspump-direct-source.py +87 -0
- bitswan-2024.4/examples/Advanced/bspump-dnsenricher.py +92 -0
- bitswan-2024.4/examples/Advanced/bspump-elasticlookup.py +82 -0
- bitswan-2024.4/examples/Advanced/bspump-es-context-enrichment.py +66 -0
- bitswan-2024.4/examples/Advanced/bspump-es-es.py +74 -0
- bitswan-2024.4/examples/Advanced/bspump-es-sink.py +62 -0
- bitswan-2024.4/examples/Advanced/bspump-es-source.py +52 -0
- bitswan-2024.4/examples/Advanced/bspump-essource-sftpsink.py +0 -0
- bitswan-2024.4/examples/Advanced/bspump-ftp-source.py +59 -0
- bitswan-2024.4/examples/Advanced/bspump-http.py +57 -0
- bitswan-2024.4/examples/Advanced/bspump-hyperloglog.py +100 -0
- bitswan-2024.4/examples/Advanced/bspump-influx.py +46 -0
- bitswan-2024.4/examples/Advanced/bspump-insert-pipeline.py +46 -0
- bitswan-2024.4/examples/Advanced/bspump-integrity-enricher.py +78 -0
- bitswan-2024.4/examples/Advanced/bspump-ipc-datagram.py +39 -0
- bitswan-2024.4/examples/Advanced/bspump-ipc-ssl-source.py +50 -0
- bitswan-2024.4/examples/Advanced/bspump-ipc-tcp-sink.py +41 -0
- bitswan-2024.4/examples/Advanced/bspump-ipc-tcp-source.py +39 -0
- bitswan-2024.4/examples/Advanced/bspump-ipgeo.py +94 -0
- bitswan-2024.4/examples/Advanced/bspump-kafka-topic-initializer.py +72 -0
- bitswan-2024.4/examples/Advanced/bspump-kafka.py +48 -0
- bitswan-2024.4/examples/Advanced/bspump-latch.py +47 -0
- bitswan-2024.4/examples/Advanced/bspump-ldap-source.py +61 -0
- bitswan-2024.4/examples/Advanced/bspump-locate.py +66 -0
- bitswan-2024.4/examples/Advanced/bspump-lookup-memcached.py +60 -0
- bitswan-2024.4/examples/Advanced/bspump-lookup.py +127 -0
- bitswan-2024.4/examples/Advanced/bspump-mongo-sink.py +36 -0
- bitswan-2024.4/examples/Advanced/bspump-mongo-source.py +69 -0
- bitswan-2024.4/examples/Advanced/bspump-mongolookup.py +79 -0
- bitswan-2024.4/examples/Advanced/bspump-mongosource-sftpsink.py +116 -0
- bitswan-2024.4/examples/Advanced/bspump-mysql-binary-log.py +88 -0
- bitswan-2024.4/examples/Advanced/bspump-mysql-lookup-microservice.py +78 -0
- bitswan-2024.4/examples/Advanced/bspump-mysql-lookup.py +100 -0
- bitswan-2024.4/examples/Advanced/bspump-mysql.py +103 -0
- bitswan-2024.4/examples/Advanced/bspump-net-flow.py +27 -0
- bitswan-2024.4/examples/Advanced/bspump-odbc.py +98 -0
- bitswan-2024.4/examples/Advanced/bspump-oob-async.py +73 -0
- bitswan-2024.4/examples/Advanced/bspump-oob-proactor.py +84 -0
- bitswan-2024.4/examples/Advanced/bspump-parquet.py +63 -0
- bitswan-2024.4/examples/Advanced/bspump-parser.py +89 -0
- bitswan-2024.4/examples/Advanced/bspump-postgres-wal-source.py +41 -0
- bitswan-2024.4/examples/Advanced/bspump-postgresql-lookup.py +102 -0
- bitswan-2024.4/examples/Advanced/bspump-postgresql.py +83 -0
- bitswan-2024.4/examples/Advanced/bspump-profiler.py +68 -0
- bitswan-2024.4/examples/Advanced/bspump-pumpbuilder.py +46 -0
- bitswan-2024.4/examples/Advanced/bspump-random.py +52 -0
- bitswan-2024.4/examples/Advanced/bspump-router.py +177 -0
- bitswan-2024.4/examples/Advanced/bspump-sa.py +135 -0
- bitswan-2024.4/examples/Advanced/bspump-serialization-mmap.py +141 -0
- bitswan-2024.4/examples/Advanced/bspump-simple-twa.py +115 -0
- bitswan-2024.4/examples/Advanced/bspump-sklearn-random-forest-classifier.py +197 -0
- bitswan-2024.4/examples/Advanced/bspump-slack.py +54 -0
- bitswan-2024.4/examples/Advanced/bspump-smtp.py +72 -0
- bitswan-2024.4/examples/Advanced/bspump-ssh-sink.py +101 -0
- bitswan-2024.4/examples/Advanced/bspump-subprocess.py +38 -0
- bitswan-2024.4/examples/Advanced/bspump-tensorflow-lstm-time-series.py +161 -0
- bitswan-2024.4/examples/Advanced/bspump-threshold-analyzer.py +112 -0
- bitswan-2024.4/examples/Advanced/bspump-transformator.py +58 -0
- bitswan-2024.4/examples/Advanced/bspump-twa.py +206 -0
- bitswan-2024.4/examples/Advanced/bspump-udp.py +33 -0
- bitswan-2024.4/examples/Advanced/bspump-weather-api.py +50 -0
- bitswan-2024.4/examples/Advanced/bspump-web.py +42 -0
- bitswan-2024.4/examples/Advanced/bspump-winrm.py +49 -0
- bitswan-2024.4/examples/Advanced/bspump-ws-client.py +42 -0
- bitswan-2024.4/examples/Advanced/bspump-ws-server.py +28 -0
- bitswan-2024.4/examples/Advanced/classification/MBDomainsModel.pkl +0 -0
- bitswan-2024.4/examples/Advanced/classification/MBLabelEncoder.pkl +0 -0
- bitswan-2024.4/examples/Advanced/classification/named.log-processed +1 -0
- bitswan-2024.4/examples/Advanced/data/anomalies.txt +4 -0
- bitswan-2024.4/examples/Advanced/data/avro_data.avro +0 -0
- bitswan-2024.4/examples/Advanced/data/avro_schema.avsc +11 -0
- bitswan-2024.4/examples/Advanced/data/bspump-profiler.json +5 -0
- bitswan-2024.4/examples/Advanced/data/city.csv +4 -0
- bitswan-2024.4/examples/Advanced/data/country_names.json +252 -0
- bitswan-2024.4/examples/Advanced/data/declarative-input.yml +28 -0
- bitswan-2024.4/examples/Advanced/data/declarative-parser-input.yml +5 -0
- bitswan-2024.4/examples/Advanced/data/es_sink.json +2 -0
- bitswan-2024.4/examples/Advanced/data/hello.txt +1 -0
- bitswan-2024.4/examples/Advanced/data/ip_address_source.csv +2 -0
- bitswan-2024.4/examples/Advanced/data/ip_addresses.csv +3 -0
- bitswan-2024.4/examples/Advanced/data/kafka-topic-config.yml +8 -0
- bitswan-2024.4/examples/Advanced/data/large-file.json +11352 -0
- bitswan-2024.4/examples/Advanced/data/sample-for-avro-schema.avsc +10 -0
- bitswan-2024.4/examples/Advanced/data/sample-for-avro.csv +23 -0
- bitswan-2024.4/examples/Advanced/data/sample.csv +3 -0
- bitswan-2024.4/examples/Advanced/data/sample.json +9 -0
- bitswan-2024.4/examples/Advanced/data/sample2-schema.json +11 -0
- bitswan-2024.4/examples/Advanced/data/sample2.csv +2 -0
- bitswan-2024.4/examples/Advanced/data/sample_to_avro.json +4 -0
- bitswan-2024.4/examples/Advanced/data/sampledata.json +18 -0
- bitswan-2024.4/examples/Advanced/data/test_ec_key +10 -0
- bitswan-2024.4/examples/Advanced/data/users.csv +4 -0
- bitswan-2024.4/examples/Advanced/data/users_duration_link.csv +4 -0
- bitswan-2024.4/examples/Advanced/matrix-lookup/bspump-matrix-lookup-master.py +123 -0
- bitswan-2024.4/examples/Advanced/matrix-lookup/bspump-matrix-lookup-slave.py +101 -0
- bitswan-2024.4/examples/Advanced/matrix-lookup/lookup.py +70 -0
- bitswan-2024.4/examples/Advanced/ssl/cert.pem +31 -0
- bitswan-2024.4/examples/Advanced/ssl/key.pem +52 -0
- bitswan-2024.4/examples/Advanced/timeseries/bspump-gettingstarted.py +41 -0
- bitswan-2024.4/examples/Advanced/timeseries/data.csv-processed +478 -0
- bitswan-2024.4/examples/Advanced/timeseries/exported.json +1 -0
- bitswan-2024.4/examples/Advanced/timeseries/my_model.h5 +0 -0
- bitswan-2024.4/examples/Advanced/timeseries/my_parameters.json +1 -0
- bitswan-2024.4/examples/AutoPipeline/main.ipynb +229 -0
- bitswan-2024.4/examples/AutoPipeline/pipelines.conf +8 -0
- bitswan-2024.4/examples/JWTWebForm/main.ipynb +134 -0
- bitswan-2024.4/examples/JWTWebForm/pipelines.conf +3 -0
- bitswan-2024.4/examples/Kafka2Kafka/main.ipynb +192 -0
- bitswan-2024.4/examples/Kafka2Kafka/pipelines.conf +12 -0
- bitswan-2024.4/examples/Lookups/main.ipynb +183 -0
- bitswan-2024.4/examples/Lookups/pipelines.conf +7 -0
- bitswan-2024.4/examples/ProtectedWebForm/main.ipynb +130 -0
- bitswan-2024.4/examples/ProtectedWebForm/pipelines.conf +2 -0
- bitswan-2024.4/examples/ProtectedWebRouteSource/main.ipynb +95 -0
- bitswan-2024.4/examples/ProtectedWebRouteSource/pipelines.conf +2 -0
- bitswan-2024.4/examples/Secrets/example-secrets-dir/bar +1 -0
- bitswan-2024.4/examples/Secrets/example-secrets-dir/baz +1 -0
- bitswan-2024.4/examples/Secrets/example-secrets-dir/foo +1 -0
- bitswan-2024.4/examples/Secrets/main.ipynb +95 -0
- bitswan-2024.4/examples/Secrets/pipelines.conf +2 -0
- bitswan-2024.4/examples/Testing/AutoPipeline/main.ipynb +115 -0
- bitswan-2024.4/examples/Testing/AutoPipeline/pipelines.conf +8 -0
- bitswan-2024.4/examples/Testing/ExpectError/main.ipynb +354 -0
- bitswan-2024.4/examples/Testing/ExpectError/pipelines.conf +8 -0
- bitswan-2024.4/examples/Testing/InspectError/main.ipynb +354 -0
- bitswan-2024.4/examples/Testing/InspectError/pipelines.conf +8 -0
- bitswan-2024.4/examples/Testing/MultiplePipelines/main.ipynb +354 -0
- bitswan-2024.4/examples/Testing/MultiplePipelines/pipelines.conf +8 -0
- bitswan-2024.4/examples/Testing/ProbeError/main.ipynb +354 -0
- bitswan-2024.4/examples/Testing/ProbeError/pipelines.conf +8 -0
- bitswan-2024.4/examples/Testing/main.ipynb +285 -0
- bitswan-2024.4/examples/Testing/pipelines.conf +8 -0
- bitswan-2024.4/examples/WebForms/main.ipynb +113 -0
- bitswan-2024.4/examples/WebHooks/main.ipynb +158 -0
- bitswan-2024.4/examples/WebHooks/pipelines.conf +12 -0
- bitswan-2024.4/examples/WebServer/main.ipynb +96 -0
- bitswan-2024.4/icons/bitswan-logo.svg +47 -0
- bitswan-2024.4/perf/README.md +4 -0
- bitswan-2024.4/perf/data/sample-for-avro-schema.avsc +10 -0
- bitswan-2024.4/perf/data/sample-for-avro.csv +23 -0
- bitswan-2024.4/perf/elasticsearch/README.md +18 -0
- bitswan-2024.4/perf/elasticsearch/perf-baseline-sink.py +53 -0
- bitswan-2024.4/perf/elasticsearch/perf-es-sink.py +57 -0
- bitswan-2024.4/pre/entrypoint.sh +8 -0
- bitswan-2024.4/pyproject.toml +74 -0
- bitswan-2024.4/pytest.ini +3 -0
- bitswan-2024.4/shell.nix +22 -0
- bitswan-2024.4/test/__init__.py +11 -0
- bitswan-2024.4/test/analyzer/__init__.py +6 -0
- bitswan-2024.4/test/analyzer/test_analyzer.py +24 -0
- bitswan-2024.4/test/analyzer/test_geoanalyzer.py +20 -0
- bitswan-2024.4/test/analyzer/test_latch.py +94 -0
- bitswan-2024.4/test/analyzer/test_sessionanalyzer.py +22 -0
- bitswan-2024.4/test/analyzer/test_timedriftanalyzer.py +21 -0
- bitswan-2024.4/test/analyzer/test_timewindowanalyzer.py +22 -0
- bitswan-2024.4/test/common/__init__.py +14 -0
- bitswan-2024.4/test/common/test_aggregator.py +112 -0
- bitswan-2024.4/test/common/test_bytes.py +64 -0
- bitswan-2024.4/test/common/test_flatten.py +43 -0
- bitswan-2024.4/test/common/test_hexlify.py +20 -0
- bitswan-2024.4/test/common/test_iterator.py +45 -0
- bitswan-2024.4/test/common/test_json.py +63 -0
- bitswan-2024.4/test/common/test_mapping.py +104 -0
- bitswan-2024.4/test/common/test_null.py +15 -0
- bitswan-2024.4/test/common/test_print.py +109 -0
- bitswan-2024.4/test/common/test_time.py +38 -0
- bitswan-2024.4/test/crypto/__init__.py +2 -0
- bitswan-2024.4/test/crypto/test_aes.py +45 -0
- bitswan-2024.4/test/crypto/test_hashing.py +198 -0
- bitswan-2024.4/test/declarative/__init__.py +11 -0
- bitswan-2024.4/test/declarative/test_add_01.yaml +4 -0
- bitswan-2024.4/test/declarative/test_add_02.yaml +5 -0
- bitswan-2024.4/test/declarative/test_and_01.yaml +8 -0
- bitswan-2024.4/test/declarative/test_config_01.yaml +5 -0
- bitswan-2024.4/test/declarative/test_datetime_add.yaml +6 -0
- bitswan-2024.4/test/declarative/test_datetime_parse_fail.yaml +6 -0
- bitswan-2024.4/test/declarative/test_datetime_parse_set_year.yaml +5 -0
- bitswan-2024.4/test/declarative/test_datetime_parse_timezone.yaml +5 -0
- bitswan-2024.4/test/declarative/test_datetime_parse_tz.yaml +4 -0
- bitswan-2024.4/test/declarative/test_declarative_add.py +34 -0
- bitswan-2024.4/test/declarative/test_declarative_and.py +20 -0
- bitswan-2024.4/test/declarative/test_declarative_config.py +23 -0
- bitswan-2024.4/test/declarative/test_declarative_datetime.py +56 -0
- bitswan-2024.4/test/declarative/test_declarative_dict.py +53 -0
- bitswan-2024.4/test/declarative/test_declarative_dict_parse.py +54 -0
- bitswan-2024.4/test/declarative/test_declarative_join.py +37 -0
- bitswan-2024.4/test/declarative/test_declarative_nested_expression.py +71 -0
- bitswan-2024.4/test/declarative/test_declarative_nested_expression.yaml +36 -0
- bitswan-2024.4/test/declarative/test_declarative_regex.py +59 -0
- bitswan-2024.4/test/declarative/test_declarative_time.py +25 -0
- bitswan-2024.4/test/declarative/test_declarative_when.py +35 -0
- bitswan-2024.4/test/declarative/test_dict_01.yaml +6 -0
- bitswan-2024.4/test/declarative/test_dict_02.yaml +6 -0
- bitswan-2024.4/test/declarative/test_dict_parse_kvdqs_01.yaml +4 -0
- bitswan-2024.4/test/declarative/test_dict_parse_kvs_01.yaml +4 -0
- bitswan-2024.4/test/declarative/test_dict_parse_qs_01.yaml +4 -0
- bitswan-2024.4/test/declarative/test_join_01.yaml +9 -0
- bitswan-2024.4/test/declarative/test_join_02.yaml +10 -0
- bitswan-2024.4/test/declarative/test_now.yaml +2 -0
- bitswan-2024.4/test/declarative/test_regex_parse_01.yaml +22 -0
- bitswan-2024.4/test/declarative/test_regex_parse_02.yaml +24 -0
- bitswan-2024.4/test/declarative/test_when.yaml +34 -0
- bitswan-2024.4/test/file/__init__.py +1 -0
- bitswan-2024.4/test/file/test_fileblocksink.py +24 -0
- bitswan-2024.4/test/filter/__init__.py +3 -0
- bitswan-2024.4/test/filter/test_attributefilter.py +74 -0
- bitswan-2024.4/test/filter/test_contentfilter.py +60 -0
- bitswan-2024.4/test/filter/test_timedriftfilter.py +28 -0
- bitswan-2024.4/test/influxdb/__init__.py +1 -0
- bitswan-2024.4/test/influxdb/test_influxdbsink.py +42 -0
- bitswan-2024.4/test/integrity/__init__.py +1 -0
- bitswan-2024.4/test/integrity/test_integrity.py +53 -0
- bitswan-2024.4/test/kafka/__init__.py +1 -0
- bitswan-2024.4/test/kafka/test_kafkasink.py +57 -0
- bitswan-2024.4/test/matrix/__init__.py +5 -0
- bitswan-2024.4/test/matrix/test_geo_matrix.py +68 -0
- bitswan-2024.4/test/matrix/test_matrix.py +81 -0
- bitswan-2024.4/test/matrix/test_named_matrix.py +83 -0
- bitswan-2024.4/test/matrix/test_session_matrix.py +83 -0
- bitswan-2024.4/test/matrix/test_time_window_matrix.py +96 -0
- bitswan-2024.4/test/test_config_defaults.py +27 -0
- bitswan-2024.4/test/test_metrics_service.py +63 -0
|
@@ -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.10 Test
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
|
|
9
|
+
container:
|
|
10
|
+
image: python:3.10
|
|
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-cli --test examples/Testing/main.ipynb
|
|
29
|
+
bitswan-cli --test examples/Testing/MultiplePipelines/main.ipynb
|
|
30
|
+
bitswan-cli --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,40 @@
|
|
|
1
|
+
FROM python:3.10-slim-bullseye
|
|
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 . /src/
|
|
25
|
+
RUN cd /src/ ; pip3 install .
|
|
26
|
+
|
|
27
|
+
COPY pre/ /opt/
|
|
28
|
+
|
|
29
|
+
CMD ["sh", "/opt/entrypoint.sh"]
|
|
30
|
+
|
|
31
|
+
# Setup bitswan user
|
|
32
|
+
|
|
33
|
+
RUN useradd --uid 1000 --create-home bitswan
|
|
34
|
+
ENV HOME=/home/bitswan
|
|
35
|
+
USER bitswan
|
|
36
|
+
|
|
37
|
+
USER root
|
|
38
|
+
RUN mkdir -p /home/bitswan/work
|
|
39
|
+
RUN chown -R bitswan:bitswan /home/bitswan/work
|
|
40
|
+
|
bitswan-2024.4/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 @@
|
|
|
1
|
+
include *.txt *.md
|
bitswan-2024.4/PKG-INFO
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: bitswan
|
|
3
|
+
Version: 2024.4
|
|
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
|
+
Requires-Dist: aiohttp>=3.8.3
|
|
37
|
+
Requires-Dist: aiomysql>=0.0.20
|
|
38
|
+
Requires-Dist: aiosmtplib>=1.1.3
|
|
39
|
+
Requires-Dist: aiozk>=0.25.0
|
|
40
|
+
Requires-Dist: confluent-kafka>=1.8.2
|
|
41
|
+
Requires-Dist: croniter>=1.4.1
|
|
42
|
+
Requires-Dist: docker
|
|
43
|
+
Requires-Dist: dockerfile-parse
|
|
44
|
+
Requires-Dist: fastavro>=0.23.5
|
|
45
|
+
Requires-Dist: fastjsonschema<3,>=2.16.2
|
|
46
|
+
Requires-Dist: google-api-python-client>=1.7.10
|
|
47
|
+
Requires-Dist: jupyter
|
|
48
|
+
Requires-Dist: kazoo<3,>=2.9.0
|
|
49
|
+
Requires-Dist: mongoquery>=1.3.6
|
|
50
|
+
Requires-Dist: motor>=2.1.0
|
|
51
|
+
Requires-Dist: mysql-replication>=0.21
|
|
52
|
+
Requires-Dist: nest-asyncio==1.6.0
|
|
53
|
+
Requires-Dist: netaddr>=0.7.20
|
|
54
|
+
Requires-Dist: numpy>=1.19.0
|
|
55
|
+
Requires-Dist: orjson
|
|
56
|
+
Requires-Dist: paho-mqtt
|
|
57
|
+
Requires-Dist: pandas>=0.24.2
|
|
58
|
+
Requires-Dist: pika>=1.1.0
|
|
59
|
+
Requires-Dist: pyasn1==0.4.8
|
|
60
|
+
Requires-Dist: pybind11>=2.6.1
|
|
61
|
+
Requires-Dist: pyjwt==v2.10.0
|
|
62
|
+
Requires-Dist: pymongo>=3.10.1
|
|
63
|
+
Requires-Dist: pymysql<=0.9.2,>=0.9.2
|
|
64
|
+
Requires-Dist: python-dotenv==1.0.1
|
|
65
|
+
Requires-Dist: pytz>=2020.1
|
|
66
|
+
Requires-Dist: pyyaml>=5.4
|
|
67
|
+
Requires-Dist: requests>=2.24.0
|
|
68
|
+
Requires-Dist: xxhash>=1.4.4
|
|
69
|
+
Provides-Extra: dev
|
|
70
|
+
Requires-Dist: black==23.1.0; extra == 'dev'
|
|
71
|
+
Requires-Dist: coverage==4.5.3; extra == 'dev'
|
|
72
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
73
|
+
Requires-Dist: pytest-asyncio; extra == 'dev'
|
|
74
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
75
|
+
Provides-Extra: pyjq-support
|
|
76
|
+
Requires-Dist: pyjq>=2.6.0; extra == 'pyjq-support'
|
|
77
|
+
Description-Content-Type: text/markdown
|
|
78
|
+
|
|
79
|
+
Bitswan: A tool for building Pipelines & Automations in Jupyter
|
|
80
|
+
===============================================
|
|
81
|
+
|
|
82
|
+
You can find example pipelines in the [examples](./examples/) directory.
|
|
83
|
+
|
|
84
|
+
Installation
|
|
85
|
+
--------------
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
$ git clone git@github.com:bitswan-space/BitSwan.git
|
|
89
|
+
$ cd BitSwan
|
|
90
|
+
$ python3 -m venv venv
|
|
91
|
+
$ source venv/bin/activate
|
|
92
|
+
$ pip3 install -e ".[dev]"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Running pipelines
|
|
96
|
+
--------------------
|
|
97
|
+
|
|
98
|
+
You can run a pipeline with a simple command:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
$ bitswan-cli examples/WebForms/main.ipynb
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
When developing web endpoints it can be helpful to instruct the pipeline to automatically restart if the source code changes.
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
$ bitswan-cli examples/WebForms/main.ipynb --watch
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Running Tests
|
|
111
|
+
----------------
|
|
112
|
+
|
|
113
|
+
You can find examples for automatically testing pipelines in the [testing examples](./examples/Testing) directory.
|
|
114
|
+
|
|
115
|
+
Run tests with the `--test` flag.
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
$ bitswan-cli examples/Testing/InspectError/main.ipynb --test
|
|
119
|
+
|
|
120
|
+
Running tests for pipeline Kafka2KafkaPipeline.
|
|
121
|
+
|
|
122
|
+
┌ Testing event: b'foo'
|
|
123
|
+
└ Outputs: [b'FOO'] ✔
|
|
124
|
+
|
|
125
|
+
All tests passed for Kafka2KafkaPipeline.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
Running tests for pipeline auto_pipeline_1.
|
|
129
|
+
|
|
130
|
+
┌ Testing event: b'{"foo":"aaa"}'
|
|
131
|
+
└ Outputs: [b'{"foo": "A A A"}'] ✔
|
|
132
|
+
|
|
133
|
+
┌ Testing event: b'{"foo":"aab"}'
|
|
134
|
+
│ Probing after-upper.
|
|
135
|
+
└ Outputs: [b'{"foo": "B A A"}'] ✔
|
|
136
|
+
|
|
137
|
+
┌ Testing event: b'{"foo":"cab"}'
|
|
138
|
+
└ Outputs: [b'{"foo": "B A C"}'] ✘
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
You can combine `--test` with `--watch` to automatically rerun tests whenever the source files change.
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
Licence
|
|
145
|
+
-------
|
|
146
|
+
|
|
147
|
+
Bitswan is open-source software, available under BSD 3-Clause License.
|
|
148
|
+
|
bitswan-2024.4/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
```
|
|
10
|
+
$ git clone git@github.com:bitswan-space/BitSwan.git
|
|
11
|
+
$ cd BitSwan
|
|
12
|
+
$ python3 -m venv venv
|
|
13
|
+
$ source venv/bin/activate
|
|
14
|
+
$ pip3 install -e ".[dev]"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Running pipelines
|
|
18
|
+
--------------------
|
|
19
|
+
|
|
20
|
+
You can run a pipeline with a simple command:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
$ bitswan-cli examples/WebForms/main.ipynb
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
When developing web endpoints it can be helpful to instruct the pipeline to automatically restart if the source code changes.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
$ bitswan-cli examples/WebForms/main.ipynb --watch
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Running Tests
|
|
33
|
+
----------------
|
|
34
|
+
|
|
35
|
+
You can find examples for automatically testing pipelines in the [testing examples](./examples/Testing) directory.
|
|
36
|
+
|
|
37
|
+
Run tests with the `--test` flag.
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
$ bitswan-cli examples/Testing/InspectError/main.ipynb --test
|
|
41
|
+
|
|
42
|
+
Running tests for pipeline Kafka2KafkaPipeline.
|
|
43
|
+
|
|
44
|
+
┌ Testing event: b'foo'
|
|
45
|
+
└ Outputs: [b'FOO'] ✔
|
|
46
|
+
|
|
47
|
+
All tests passed for Kafka2KafkaPipeline.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
Running tests for pipeline auto_pipeline_1.
|
|
51
|
+
|
|
52
|
+
┌ Testing event: b'{"foo":"aaa"}'
|
|
53
|
+
└ Outputs: [b'{"foo": "A A A"}'] ✔
|
|
54
|
+
|
|
55
|
+
┌ Testing event: b'{"foo":"aab"}'
|
|
56
|
+
│ Probing after-upper.
|
|
57
|
+
└ Outputs: [b'{"foo": "B A A"}'] ✔
|
|
58
|
+
|
|
59
|
+
┌ Testing event: b'{"foo":"cab"}'
|
|
60
|
+
└ Outputs: [b'{"foo": "B A C"}'] ✘
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
You can combine `--test` with `--watch` to automatically rerun tests whenever the source files change.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
Licence
|
|
67
|
+
-------
|
|
68
|
+
|
|
69
|
+
Bitswan is open-source software, available under BSD 3-Clause License.
|
|
70
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from .application import BSPumpApplication
|
|
2
|
+
from .service import BSPumpService
|
|
3
|
+
from .pipeline import Pipeline
|
|
4
|
+
from .pumpbuilder import PumpBuilder
|
|
5
|
+
from .abc.source import Source
|
|
6
|
+
from .abc.source import TriggerSource
|
|
7
|
+
from .abc.sink import Sink
|
|
8
|
+
from .abc.processor import Processor
|
|
9
|
+
from .abc.generator import Generator
|
|
10
|
+
from .abc.connection import Connection
|
|
11
|
+
|
|
12
|
+
from .exception import ProcessingError
|
|
13
|
+
from .abc.lookup import Lookup
|
|
14
|
+
from .abc.lookup import MappingLookup
|
|
15
|
+
from .abc.lookup import DictionaryLookup
|
|
16
|
+
from .fileloader import load_json_file
|
|
17
|
+
|
|
18
|
+
from .analyzer.analyzer import Analyzer
|
|
19
|
+
|
|
20
|
+
from .matrix.matrix import Matrix, PersistentMatrix
|
|
21
|
+
from .matrix.namedmatrix import NamedMatrix, PersistentNamedMatrix
|
|
22
|
+
from .model.model import Model
|
|
23
|
+
|
|
24
|
+
from .abc.anomaly import Anomaly
|
|
25
|
+
|
|
26
|
+
from .__version__ import __version__, __build__
|
|
27
|
+
|
|
28
|
+
__all__ = (
|
|
29
|
+
"BSPumpApplication",
|
|
30
|
+
"BSPumpService",
|
|
31
|
+
"Pipeline",
|
|
32
|
+
"PumpBuilder",
|
|
33
|
+
"Source",
|
|
34
|
+
"TriggerSource",
|
|
35
|
+
"Sink",
|
|
36
|
+
"Processor",
|
|
37
|
+
"Generator",
|
|
38
|
+
"Connection",
|
|
39
|
+
"Analyzer",
|
|
40
|
+
"ProcessingError",
|
|
41
|
+
"Lookup",
|
|
42
|
+
"MappingLookup",
|
|
43
|
+
"DictionaryLookup",
|
|
44
|
+
"load_json_file",
|
|
45
|
+
"Matrix",
|
|
46
|
+
"PersistentMatrix",
|
|
47
|
+
"NamedMatrix",
|
|
48
|
+
"Model",
|
|
49
|
+
"PersistentNamedMatrix",
|
|
50
|
+
"Anomaly",
|
|
51
|
+
"__version__",
|
|
52
|
+
"__build__",
|
|
53
|
+
"step",
|
|
54
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# THIS-FILE-WILL-BE-REPLACED !!! DO NOT CHANGE OR MODIFY THIS FILE !!!
|
|
2
|
+
|
|
3
|
+
# During `setup.py build_py`, this file is overwritten
|
|
4
|
+
# __version__ = '[git describe --abbrev=7 --tags --dirty=+dirty --always]
|
|
5
|
+
# __build__ = '[git rev-parse HEAD]'
|
|
6
|
+
|
|
7
|
+
# PEP 440 -- Version Identification and Dependency Specification
|
|
8
|
+
# https://www.python.org/dev/peps/pep-0440/
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
__version__ = "devel"
|
|
12
|
+
__build__ = "devel"
|
|
File without changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
class Anomaly(dict):
|
|
2
|
+
"""
|
|
3
|
+
Description: Anomaly is an abstract class to be overriden for a specific anomaly and its type.
|
|
4
|
+
|
|
5
|
+
:return:
|
|
6
|
+
|
|
7
|
+
Implement: TYPE, on_tick
|
|
8
|
+
|
|
9
|
+
|
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
TYPE = None
|
|
14
|
+
|
|
15
|
+
def is_closed(self):
|
|
16
|
+
"""
|
|
17
|
+
Description:
|
|
18
|
+
|
|
19
|
+
:return: sets status to closed
|
|
20
|
+
|
|
21
|
+
|
|
|
22
|
+
|
|
23
|
+
"""
|
|
24
|
+
return self.get("status") == "closed"
|
|
25
|
+
|
|
26
|
+
def close(self, current_time):
|
|
27
|
+
"""
|
|
28
|
+
Description:
|
|
29
|
+
|
|
30
|
+
"""
|
|
31
|
+
self["ts_end"] = current_time
|
|
32
|
+
self["D"] = self["ts_end"] - self["@timestamp"]
|
|
33
|
+
self["status"] = "closed"
|
|
34
|
+
|
|
35
|
+
async def on_tick(self, current_time):
|
|
36
|
+
"""
|
|
37
|
+
Description:
|
|
38
|
+
|
|
39
|
+
:hint: Implement to perform operations on the anomaly, f. e. close.
|
|
40
|
+
"""
|
|
41
|
+
raise NotImplementedError()
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import abc
|
|
2
|
+
from bspump.asab import Configurable
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Connection(abc.ABC, Configurable):
|
|
6
|
+
"""
|
|
7
|
+
Connection class is responsible for creating a connection between items or services within the infrastructure of BSPump.
|
|
8
|
+
Their main use is to create connection with the main components of BSPump: source, :meth:`processor <bspump.Processor()>` and sink.
|
|
9
|
+
|
|
10
|
+
|
|
|
11
|
+
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, app, id=None, config=None):
|
|
15
|
+
"""
|
|
16
|
+
Description:
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
**Parameters**
|
|
20
|
+
|
|
21
|
+
app : Application
|
|
22
|
+
Specification of an `Application <https://asab.readthedocs.io/en/latest/asab/application.html#>`_.
|
|
23
|
+
|
|
24
|
+
id : default None
|
|
25
|
+
|
|
26
|
+
config : JSON or other compatible format, default None
|
|
27
|
+
It contains important information and data responsible for creating a connection.
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
_id = id if id is not None else self.__class__.__name__
|
|
32
|
+
super().__init__("connection:{}".format(_id), config=config)
|
|
33
|
+
|
|
34
|
+
self.App = app
|
|
35
|
+
self.Loop = app.Loop
|
|
36
|
+
|
|
37
|
+
self.Id = _id
|
|
38
|
+
|
|
39
|
+
def time(self):
|
|
40
|
+
"""
|
|
41
|
+
Returns accurate time of the asynchronous process.
|
|
42
|
+
|
|
43
|
+
:hint: More information in the ASAB documentation in `UTC Time <https://asab.readthedocs.io/en/latest/asab/application.html#utc-time>`_.
|
|
44
|
+
|
|
45
|
+
|
|
|
46
|
+
|
|
47
|
+
"""
|
|
48
|
+
return self.App.time()
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def construct(cls, app, definition: dict):
|
|
52
|
+
"""
|
|
53
|
+
Creates a connection based on a specific definition. For example, a JSON file.
|
|
54
|
+
|
|
55
|
+
**Parameters**
|
|
56
|
+
|
|
57
|
+
app : Application
|
|
58
|
+
ID of the `Application <https://asab.readthedocs.io/en/latest/asab/application.html#>_`.
|
|
59
|
+
|
|
60
|
+
definition : definition format
|
|
61
|
+
Defines instructions for the method that can be used to create a connection.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
:return: cls(app, newid, config)
|
|
65
|
+
|
|
66
|
+
|
|
|
67
|
+
|
|
68
|
+
"""
|
|
69
|
+
newid = definition.get("id")
|
|
70
|
+
config = definition.get("config")
|
|
71
|
+
return cls(app, newid, config)
|