Metadata-Version: 2.4
Name: bitswan
Version: 2025.11.4.26
Summary: Bitswan is a framework for building automations and pipelines in Jupyter
Project-URL: homepage, https://github.com/bitswan-space/BitSwan
Author-email: LibertyAces Ltd <timothy.hobbs@libertyaces.com>
License: BSD 3-Clause License
        
        Copyright (c) 2018-2019, LibertyAces Ltd 
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        * Redistributions of source code must retain the above copyright notice, this
          list of conditions and the following disclaimer.
        
        * Redistributions in binary form must reproduce the above copyright notice,
          this list of conditions and the following disclaimer in the documentation
          and/or other materials provided with the distribution.
        
        * Neither the name of the copyright holder nor the names of its
          contributors may be used to endorse or promote products derived from
          this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Requires-Dist: aiohttp>=3.8.3
Requires-Dist: aiomysql>=0.2.0
Requires-Dist: aiosmtplib>=1.1.3
Requires-Dist: aiozk>=0.25.0
Requires-Dist: certifi>=2023.7.22
Requires-Dist: confluent-kafka>=1.8.2
Requires-Dist: croniter>=1.4.1
Requires-Dist: cryptography>=44.0.1
Requires-Dist: docker
Requires-Dist: dockerfile-parse
Requires-Dist: fastapi
Requires-Dist: fastavro>=0.23.5
Requires-Dist: fastjsonschema<3,>=2.16.2
Requires-Dist: google-api-python-client>=1.7.10
Requires-Dist: idna>=3.7
Requires-Dist: importlib-resources
Requires-Dist: jinja2>=3.1.6
Requires-Dist: jupyter
Requires-Dist: kazoo<3,>=2.9.0
Requires-Dist: matplotlib>=3.8.0
Requires-Dist: mcp==1.20.0
Requires-Dist: mongoquery>=1.3.6
Requires-Dist: motor>=2.1.0
Requires-Dist: mysql-replication>=0.21
Requires-Dist: nest-asyncio==1.6.0
Requires-Dist: netaddr>=0.7.20
Requires-Dist: numpy>=1.19.0
Requires-Dist: orjson
Requires-Dist: paho-mqtt
Requires-Dist: pandas>=0.24.2
Requires-Dist: pika>=1.1.0
Requires-Dist: pyasn1==0.4.8
Requires-Dist: pybind11>=2.6.1
Requires-Dist: pyjwt==v2.10.1
Requires-Dist: pymongo>=3.10.1
Requires-Dist: pymysql>=1.1.1
Requires-Dist: python-dotenv==1.0.1
Requires-Dist: pytz>=2020.1
Requires-Dist: pyyaml>=5.4
Requires-Dist: requests>=2.32.0
Requires-Dist: setuptools>=70.0.0
Requires-Dist: urllib3>=1.26.19
Requires-Dist: uvicorn
Requires-Dist: xxhash>=1.4.4
Requires-Dist: zipp>=3.19.1
Provides-Extra: dev
Requires-Dist: coverage==4.5.3; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: watchdog==6.0.0; extra == 'dev'
Provides-Extra: pyjq-support
Requires-Dist: pyjq>=2.6.0; extra == 'pyjq-support'
Description-Content-Type: text/markdown

[![Docs](https://img.shields.io/badge/docs-latest-brightgreen)](https://docs.bitswan.space)

Bitswan: A tool for building Pipelines & Automations in Jupyter
===============================================

You can find example pipelines in the [examples](./examples/) directory.

Installation
--------------

This library is part of the bitswan suite which is managed by the bitswan workspace cli.
You must first install the [bitswan workspaces](https://github.com/bitswan-space/bitswan-workspaces) cli before installing and using the bitswan notebooks cli.

```
$ git clone git@github.com:bitswan-space/BitSwan.git
$ cd BitSwan
$ curl -LsSf https://astral.sh/uv/install.sh | sh
$ uv venv
$ source .venv/bin/activate
$ uv pip install -e ".[dev]"
```

Running pipelines
--------------------

You can run a pipeline with a simple command:

```
$ bitswan notebook examples/WebForms/main.ipynb
```

When developing web endpoints it can be helpful to instruct the pipeline to automatically restart if the source code changes.

```
$ bitswan notebook examples/WebForms/main.ipynb --watch
```

Running Tests
----------------

You can find examples for automatically testing pipelines in the [testing examples](./examples/Testing) directory.

Run tests with the `--test` flag.

```
$ bitswan notebook examples/Testing/InspectError/main.ipynb --test

Running tests for pipeline Kafka2KafkaPipeline.

    ┌ Testing event:        b'foo'
    └ Outputs:              [b'FOO'] ✔

All tests passed for Kafka2KafkaPipeline.


Running tests for pipeline auto_pipeline_1.

    ┌ Testing event:        b'{"foo":"aaa"}'
    └ Outputs:              [b'{"foo": "A   A   A"}'] ✔

    ┌ Testing event:        b'{"foo":"aab"}'
    │ Probing after-upper.
    └ Outputs:              [b'{"foo": "B   A   A"}'] ✔

    ┌ Testing event:        b'{"foo":"cab"}'
    └ Outputs:              [b'{"foo": "B   A   C"}'] ✘
```

You can combine `--test` with `--watch` to automatically rerun tests whenever the source files change.


Licence
-------

Bitswan is open-source software, available under BSD 3-Clause License.

