Metadata-Version: 2.1
Name: celeryviz
Version: 0.0.0
Summary: A tool for visualising execution of Celery tasks.
Author: Bhavya Peshavaria
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Topic :: System :: Monitoring
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: aiohttp ==3.9.5
Requires-Dist: aiosignal ==1.3.1
Requires-Dist: amqp ==5.2.0
Requires-Dist: async-timeout ==4.0.3
Requires-Dist: attrs ==23.2.0
Requires-Dist: bidict ==0.23.1
Requires-Dist: billiard ==4.2.0
Requires-Dist: celery ==5.4.0
Requires-Dist: certifi ==2024.2.2
Requires-Dist: charset-normalizer ==3.3.2
Requires-Dist: click ==8.1.7
Requires-Dist: click-didyoumean ==0.3.1
Requires-Dist: click-plugins ==1.1.1
Requires-Dist: click-repl ==0.3.0
Requires-Dist: exceptiongroup ==1.2.1
Requires-Dist: frozenlist ==1.4.1
Requires-Dist: h11 ==0.14.0
Requires-Dist: idna ==3.7
Requires-Dist: iniconfig ==2.0.0
Requires-Dist: kombu ==5.3.7
Requires-Dist: multidict ==6.0.5
Requires-Dist: packaging ==24.0
Requires-Dist: pluggy ==1.5.0
Requires-Dist: prompt-toolkit ==3.0.43
Requires-Dist: pytest ==8.2.1
Requires-Dist: python-dateutil ==2.9.0.post0
Requires-Dist: python-engineio ==4.9.1
Requires-Dist: python-socketio ==5.11.2
Requires-Dist: requests ==2.32.2
Requires-Dist: simple-websocket ==1.0.0
Requires-Dist: six ==1.16.0
Requires-Dist: tomli ==2.0.1
Requires-Dist: tzdata ==2024.1
Requires-Dist: urllib3 ==2.2.1
Requires-Dist: vine ==5.1.0
Requires-Dist: wcwidth ==0.2.13
Requires-Dist: websocket-client ==1.8.0
Requires-Dist: wsproto ==1.2.0
Requires-Dist: yarl ==1.9.4

CeleryViz
=========

A tool for visualising execution of Celery tasks.

<video src="https://github.com/user-attachments/assets/ec6b0f0e-2ad6-4a2c-8928-a7765fd96023"></video>


## Installation

```bash
pip install celeryviz
```

## Usage

#### 1. Create a celery project.
  - Use [this gist](https://gist.github.com/bhavya-tech/d937ef45905720014ee12fe332352966) for a minimal example.

#### 2. Start the celery worker:

```bash
celery -A example_app worker
```

#### 3. Start the CeleryViz server:

```bash
celery -A example_app celeryviz
```

  -  Open your browser and go to [http://localhost:5000/]()

  - The `attach_log_sender` in the example gist sends logs to CeleryViz.
    - If a custom logger does not support handlers, then monkeypatch the logger to mimic the `attach_log_sender` function.

# Contributing

## Setting up the development environment
#### 1. Clone this repository.
```bash
git clone https://github.com/bhavya-tech/celeryviz.git
```

#### 2. Build the webapp

  - The UI webapp is maintained separately in [celeryviz_with_lib](https://github.com/bhavya-tech/celeryviz_with_lib).

  - Run the following command to build the latest version of standard webapp locally (ensure that [docker](https://www.docker.com/) is installed):

```bash
docker build --output ./celeryviz/static ./build_ui
```

For customised builds, the following optional build args can be used:
- `GITHUB_PAT`
    - If any of dependency repo is private, add a github personal access token as a build argument.
- `GIT_REPO`
    - The URL of the repository to build.
    - Defaults to [bhavya-tech/celeryviz_with_lib](https://github.com/bhavya-tech/celeryviz_with_lib.git)
- `SOURCE`
    - The branch of the repository to build. Default is `main`.
    - A particular commit hash can also be used.

```bash
docker build --output ./celeryviz/static --build-arg="GITHUB_PAT=<your github personal access token>" ./build_ui
```

#### 3. Install the package in editable mode:

```bash
pip install -e .
```

