Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3b48bb5
Extract codecs module, add BaseConsumer and FunctionalConsumer
gmr Apr 2, 2026
62c4f1a
Move config pydantic models to models.py
gmr Apr 2, 2026
c4a5b89
Add docstrings to all internal codec helpers
gmr Apr 2, 2026
f357f32
Disable magic trailing commas in ruff format
gmr Apr 2, 2026
06c155c
Move data classes to pydantic models
gmr Apr 2, 2026
b20f511
Fix typing in connection.py for pika callback signatures
gmr Apr 2, 2026
2b5dd04
Add mypy configuration, ignore missing pika stubs
gmr Apr 2, 2026
69afc9f
Add type annotations to state.py, fix type: ignore in connection.py
gmr Apr 2, 2026
286c75d
Add type annotations to codecs.py, fix mypy config
gmr Apr 2, 2026
2238b82
Add type annotations to log.py and models.py, fix mypy issues
gmr Apr 2, 2026
9c09b32
Add type annotations to all non-consumer modules
gmr Apr 2, 2026
453dfe4
Align indentation and formatting across `connection.py` and `pyprojec…
gmr Apr 2, 2026
1faeb7f
Update copyright years in LICENSE to 2026
gmr Apr 2, 2026
107552a
Remove unused example consumer and test message generator
gmr Apr 2, 2026
c387251
4.0 refactor: Codec class, models, BaseConsumer, TransactionConsumer
gmr Apr 2, 2026
2e982e8
Address CI failures and CodeRabbit review feedback
gmr Apr 2, 2026
c527c26
Fix pika.frame.Method not subscriptable on Python <3.14
gmr Apr 2, 2026
e75b26d
Fix csv.DictReader not subscriptable on Python 3.11
gmr Apr 2, 2026
b8d6db9
Address CodeRabbit review feedback
gmr Apr 3, 2026
d22b034
Address CodeRabbit nitpicks: retry, state alias, test result handling
gmr Apr 3, 2026
7639306
Security hardening and cleanup from full code review
gmr Apr 3, 2026
87439f7
Address CodeRabbit review: codec and connection hardening
gmr Apr 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2009-2017, Gavin M. Roy
Copyright (c) 2009-2026, Gavin M. Roy
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
37 changes: 3 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ each run in an isolated process. It has the ability to collect statistical
data from the consumer processes and report on it.

[![Version](https://img.shields.io/pypi/v/rejected.svg?)](https://pypi.python.org/pypi/rejected)
[![Coverage](https://img.shields.io/codecov/c/github/gmr/rejected.svg?)](https://codecov.io/github/gmr/rejected?branch=main)
[![License](https://img.shields.io/pypi/l/rejected.svg?)](https://github.com/gmr/rejected/blob/main/LICENSE)

## Features
Expand All @@ -30,6 +29,7 @@ pip install rejected
For optional features:

```bash
pip install rejected[avro] # Avro support
pip install rejected[html] # HTML message body support
pip install rejected[msgpack] # MessagePack support
```
Expand All @@ -49,37 +49,6 @@ LOGGER = logging.getLogger(__name__)

class Test(consumer.Consumer):

def process(self, message):
LOGGER.debug('In Test.process: %s', message.body)
async def process(self) -> None:
LOGGER.debug('In Test.process: %s', self.body)
```

## Async Consumer

To make a consumer async, you can use Tornado's `@gen.coroutine` decorator on the
`Consumer.prepare` and `Consumer.process` methods. Asynchronous consumers allow
you to use async clients like Tornado's `AsyncHTTPClient` to perform parallel
tasks when processing a single message.

```python
import logging

from rejected import consumer

from tornado import gen
from tornado import httpclient


class AsyncExampleConsumer(consumer.Consumer):

@gen.coroutine
def process(self):
LOGGER.debug('Message: %r', self.body)
http_client = httpclient.AsyncHTTPClient()
results = yield [http_client.fetch('http://www.github.com'),
http_client.fetch('http://www.reddit.com')]
LOGGER.info('Length: %r', [len(r.body) for r in results])
```

## Version History

See [HISTORY.md](HISTORY.md) or the [documentation](https://rejected.readthedocs.io).
177 changes: 0 additions & 177 deletions docs/Makefile

This file was deleted.

66 changes: 0 additions & 66 deletions docs/conf.py

This file was deleted.

Loading
Loading