Metadata-Version: 2.4
Name: flowgate
Version: 0.0.4
Summary: Flowgate is a kafka client library for building event-driven systems.
Project-URL: Homepage, https://github.com/nf1s/flowgate
Project-URL: Issues, https://github.com/nf1s/flowgate/issues
Author-email: nf1s <ahmed.nafies@gmail.com>
License: MIT
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Dist: confluent-kafka>=1.8.2
Requires-Dist: confluent-kafka[avro]>=1.8.2
Requires-Dist: jsonpickle>=0.9.6
Requires-Dist: structlog>=17.2.0
Provides-Extra: cnamedtuple
Requires-Dist: cnamedtuple>=0.1.6; extra == 'cnamedtuple'
Provides-Extra: dev
Requires-Dist: fakeredis; extra == 'dev'
Requires-Dist: flake8; extra == 'dev'
Requires-Dist: flake8-eradicate; extra == 'dev'
Requires-Dist: flake8-isort; extra == 'dev'
Requires-Dist: ipdb; extra == 'dev'
Requires-Dist: isort; extra == 'dev'
Requires-Dist: mongomock; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pdbpp; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-coverage; extra == 'dev'
Requires-Dist: pytest-mock; extra == 'dev'
Requires-Dist: pytest-sugar; extra == 'dev'
Requires-Dist: types-redis; extra == 'dev'
Requires-Dist: yapf; extra == 'dev'
Provides-Extra: mongo
Requires-Dist: pymongo>=3.6.1; extra == 'mongo'
Provides-Extra: redis
Requires-Dist: hiredis>=0.2.0; extra == 'redis'
Requires-Dist: redis>=2.10.6; extra == 'redis'
Description-Content-Type: text/markdown

# Flowgate

Flowgate is a kafka client library for building event-driven systems.

## Setup

### Using just (recommended)

First, install [just](https://just.systems/):

```bash
# On macOS
brew install just

# On Linux
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash
```

Then set up the project:

```bash
just setup
```

### Using uv directly

```bash
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Create a virtual environment and install the package
uv venv .venv
source .venv/bin/activate
uv pip install -e ".[dev]"
```

## Development

### Available commands

```bash
just                # List all available commands
just setup          # Set up the development environment
just test           # Run tests
just lint           # Run linting checks
just build          # Build the package
just publish        # Build and publish the package
just sync           # Sync dependencies
just clean          # Clean up build artifacts
```

### Running tests

```bash
just test
```

### Linting

```bash
just lint
```

### Building and publishing

```bash
just build
just publish
```

## Optional dependencies

Flowgate supports the following optional dependencies:

- MongoDB: `uv pip install -e ".[mongo]"`
- Redis: `uv pip install -e ".[redis]"`
- cnamedtuple: `uv pip install -e ".[cnamedtuple]"`

To install all dependencies including development tools:

```bash
uv pip install -e ".[dev,mongo,redis,cnamedtuple]"
```

## Project Structure

```
flowgate/
├── __init__.py
├── command_handler.py    # Command handling functionality
├── consumer.py           # Kafka consumer implementation
├── event_handler.py      # Event handling functionality
├── handler.py            # Base handler implementation
├── helpers/              # Helper utilities
├── message.py            # Message definitions
├── messagebus/           # Message bus implementation
├── serializers.py        # Serialization utilities
└── utils.py              # General utilities
```

## License

MIT

