Faststream

Latest version: v0.5.6

Safety actively analyzes 629004 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 10

0.5.6

What's Changed

* feature: add --factory param by Sehat1137 in https://github.com/airtai/faststream/pull/1440
* feat: add RMQ channels options, support for prefix for routing_key, a… by Lancetnik in https://github.com/airtai/faststream/pull/1448
* feature: Add `from faststream.rabbit.annotations import Connection, Channel` shortcuts
* Bugfix: RabbitMQ RabbitRouter prefix now affects to queue routing key as well
* Feature (close 1402): add `broker.add_middleware` public API to append a middleware to already created broker
* Feature: add `RabbitBroker(channel_number: int, publisher_confirms: bool, on_return_raises: bool)` options to setup channel settings
* Feature (close 1447): add `StreamMessage.batch_headers` attribute to provide with access to whole batch messages headers

New Contributors

* Sehat1137 made their first contribution in https://github.com/airtai/faststream/pull/1440

**Full Changelog**: https://github.com/airtai/faststream/compare/0.5.5...0.5.6

0.5.5

What's Changed

Add support for explicit partition assignment in aiokafka `KafkaBroker` (special thanks to spataphore1337):

python
from faststream import FastStream
from faststream.kafka import KafkaBroker, TopicPartition

broker = KafkaBroker()

topic_partition_fisrt = TopicPartition("my_topic", 1)
topic_partition_second = TopicPartition("my_topic", 2)

broker.subscribe(partitions=[topic_partition_fisrt, topic_partition_second])
async def some_consumer(msg):
...


* Update Release Notes for 0.5.4 by faststream-release-notes-updater in https://github.com/airtai/faststream/pull/1421
* feature: manual partition assignment to Kafka by spataphore1337 in https://github.com/airtai/faststream/pull/1422
* Chore/update deps by Lancetnik in https://github.com/airtai/faststream/pull/1429
* Fix/correct dynamic subscriber registration by Lancetnik in https://github.com/airtai/faststream/pull/1433
* chore: bump version by Lancetnik in https://github.com/airtai/faststream/pull/1435


**Full Changelog**: https://github.com/airtai/faststream/compare/0.5.4...0.5.5

0.5.4

What's Changed

* Update Release Notes for 0.5.3 by faststream-release-notes-updater in https://github.com/airtai/faststream/pull/1400
* fix (1415): raise SetupError if rpc and reply_to are using in TestCL… by Lancetnik in https://github.com/airtai/faststream/pull/1419
* Chore/update deps2 by Lancetnik in https://github.com/airtai/faststream/pull/1418
* refactor: correct security with kwarg params merging by Lancetnik in https://github.com/airtai/faststream/pull/1417
* fix (1414): correct Messag.ack error processing by Lancetnik in https://github.com/airtai/faststream/pull/1420

**Full Changelog**: https://github.com/airtai/faststream/compare/0.5.3...0.5.4

0.5.3

What's Changed
* Update Release Notes for 0.5.2 by faststream-release-notes-updater in https://github.com/airtai/faststream/pull/1382
* Fix/setup at broker connection instead of starting by Lancetnik in https://github.com/airtai/faststream/pull/1385
* Tests/add path tests by Lancetnik in https://github.com/airtai/faststream/pull/1388
* Fix/path with router prefix by Lancetnik in https://github.com/airtai/faststream/pull/1395
* chore: update dependencies by Lancetnik in https://github.com/airtai/faststream/pull/1396
* chore: bump version by Lancetnik in https://github.com/airtai/faststream/pull/1397
* chore: polishing by davorrunje in https://github.com/airtai/faststream/pull/1399


**Full Changelog**: https://github.com/airtai/faststream/compare/0.5.2...0.5.3

0.5.2

What's Changed

Just a little bugfix patch. Fixes 1379 and 1376.

* Update Release Notes for 0.5.1 by faststream-release-notes-updater in https://github.com/airtai/faststream/pull/1378
* Tests/fastapi background by Lancetnik in https://github.com/airtai/faststream/pull/1380
* Fix/0.5.2 by Lancetnik in https://github.com/airtai/faststream/pull/1381


**Full Changelog**: https://github.com/airtai/faststream/compare/0.5.1...0.5.2

0.5.1

What's Changed

We already have some fixes related to `RedisBroker` (1375, 1376) and some new features for you:

1. Now `broke.include_router(...)` allows to pass some arguments to setup router at including moment instead of creation

python
broker.include_router(
router,
prefix="test_",
dependencies=[Depends(...)],
middlewares=[BrokerMiddleware],
include_in_schema=False,
)


2. `KafkaBroker().subscriber(...)` now consumes `aiokafka.ConsumerRebalanceListener` object.
You can find more information about it in the official [**aiokafka** doc](https://aiokafka.readthedocs.io/en/stable/consumer.html?highlight=subscribe#topic-subscription-by-pattern)

(close 1319)

python
broker = KafkaBroker()

broker.subscriber(..., listener=MyRebalancer())


`pattern` option was added too, but it is still experimental and does not support `Path`

3. [`Path`](https://faststream.airt.ai/latest/nats/message/#subject-pattern-access) feature perfomance was increased. Also, `Path` is suitable for NATS `PullSub` batch subscribtion as well now.

python
from faststream import NatsBroker, PullSub

broker = NastBroker()

broker.subscriber(
"logs.{level}",
steam="test-stream",
pull_sub=PullSub(batch=True),
)
async def base_handler(
...,
level: str = Path(),
):
...


* Update Release Notes for 0.5.0 by faststream-release-notes-updater in https://github.com/airtai/faststream/pull/1366
* chore: bump version by Lancetnik in https://github.com/airtai/faststream/pull/1372
* feat: kafka listener, extended include_router by Lancetnik in https://github.com/airtai/faststream/pull/1374
* Fix/1375 by Lancetnik in https://github.com/airtai/faststream/pull/1377


**Full Changelog**: https://github.com/airtai/faststream/compare/0.5.0...0.5.1

Page 1 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.