Faststream

Latest version: v0.5.30

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

Scan your dependencies

Page 3 of 14

0.5.18

What's Changed

* Added additional parameters to HandlerException by ulbwa in https://github.com/airtai/faststream/pull/1659
* Removed Doc and Added docstrings instead by Kirill-Stepankov in https://github.com/airtai/faststream/pull/1662
* feat (1663): support default values for Header by Lancetnik in https://github.com/airtai/faststream/pull/1667
* fix (1660): correct patch nested JStream subjects by Lancetnik in https://github.com/airtai/faststream/pull/1666
* fix: add ConfluentRouter FastAPI missed init options by Lancetnik in https://github.com/airtai/faststream/pull/1664
* Add kerberos support for confluent broker by kumaranvpl in https://github.com/airtai/faststream/pull/1670
* Fix nack for kafka and confluent brokers by kumaranvpl in https://github.com/airtai/faststream/pull/1678
* fix: support all RMQ exchanges in AsyncAPI by Lancetnik in https://github.com/airtai/faststream/pull/1679
* fix: catch parser errors by Lancetnik in https://github.com/airtai/faststream/pull/1680

New Contributors
* ulbwa made their first contribution in https://github.com/airtai/faststream/pull/1659
* Kirill-Stepankov made their first contribution in https://github.com/airtai/faststream/pull/1662

**Full Changelog**: https://github.com/airtai/faststream/compare/0.5.17...0.5.18

0.5.17

What's Changed

Just a hotfix for the following case:

python
broker.subscriber(...)
async def handler():
return NatsResponse(...)

await broker.publish(..., rpc=True)


* chore(deps): bump semgrep from 1.83.0 to 1.84.0 by dependabot in https://github.com/airtai/faststream/pull/1650
* chore(deps): bump mkdocs-material from 9.5.30 to 9.5.31 by dependabot in https://github.com/airtai/faststream/pull/1651
* Update Release Notes for 0.5.16 by faststream-release-notes-updater in https://github.com/airtai/faststream/pull/1652
* hotfix: correct NatsResponse processing in RPC case by Lancetnik in https://github.com/airtai/faststream/pull/1654


**Full Changelog**: https://github.com/airtai/faststream/compare/0.5.16...0.5.17

0.5.16

What's Changed

Well, seems like it is the biggest patch release ever 😃

Detail Responses

First of all, thanks to all new contributors, who helps us to improve the project! They made a huge impact to this release by adding new Kafka security mechanisms and extend Response API - now you can use `broker.Response` to publish detail information from handler

python
broker.subscriber("in")
broker.publisher("out")
async def handler(msg):
return Response(msg, headers={"response_header": "Hi!"}) or KafkaResponse, etc


ASGI

Also, we added a new huge feature - [**ASGI** support](https://faststream.airt.ai/latest/getting-started/asgi/#other-asgi-compatibility)!

Nope, we are not HTTP-framework now, but it is a little ASGI implementation to provide you with an ability to host documentation, use k8s http-probes and serve metrics in the same with you broker runtime without any dependencies.

You just need to use **AsgiFastStream** class

python
from faststream.nats import NatsBroker
from faststream.asgi import AsgiFastStream, make_ping_asgi

from prometheus_client import make_asgi_app
from prometheus_client.registry import CollectorRegistry

broker = NatsBroker()

prometheus_registry = CollectorRegistry()

app = AsgiFastStream(
broker,
asyncapi_path="/docs",
asgi_routes=[
("/health", make_ping_asgi(broker, timeout=5.0)),
("/metrics", make_asgi_app(registry=prometheus_registry))
]
)


And then you can run it like a regular ASGI app

shell
uvicorn main:app


Confluent partitions

One more thing - manual topic partition assignment for Confluent. We have it already for aiokafka, but missed it here... Now it was fixed!

python
from faststream.confluent import TopicPartition

broker.subscriber(partitions=[
TopicPartition("test-topic", partition=0),
])
async def handler():
...


Detail changes

* feat: add RMQ `fail_fast` option in 1647
* fix: correct nested `NatsRouter` subjects prefixes behavior
* fix typos by newonlynew in https://github.com/airtai/faststream/pull/1609
* Feat: extend response api by Flosckow in https://github.com/airtai/faststream/pull/1607
* Feature: GSSAPI (Kerberos) support by roma-frolov in https://github.com/airtai/faststream/pull/1633
* feat: add oauth support by filip-danieluk in https://github.com/airtai/faststream/pull/1632
* fix: patch broker within testbroker context only by sfran96 in https://github.com/airtai/faststream/pull/1619
* feat: ASGI support by Lancetnik in https://github.com/airtai/faststream/pull/1635

New Contributors
* newonlynew made their first contribution in https://github.com/airtai/faststream/pull/1609
* roma-frolov made their first contribution in https://github.com/airtai/faststream/pull/1633
* filip-danieluk made their first contribution in https://github.com/airtai/faststream/pull/1632
* sfran96 made their first contribution in https://github.com/airtai/faststream/pull/1619

**Full Changelog**: https://github.com/airtai/faststream/compare/0.5.15...0.5.16

0.5.15

What's Changed

Finally, **FastStream** has a Kafka pattern subscription! This is another step forward in our [**Roadmap**](https://github.com/airtai/faststream/issues/1510) moving us to **0.6.0** and futher!

python
from faststream import Path
from faststream.kafka import KafkaBroker

broker = KafkaBroker()

broker.subscriber(pattern="logs.{level}")
async def base_handler(
body: str,
level: str = Path(),
):
...


Also, all brokers now supports a new `ping` method to check real broker connection

python
is_connected: bool = await broker.ping()


This is a little, but important change for [K8S probes](https://github.com/airtai/faststream/issues/1181) support

More other there are a lot of bugfixes and improvements from our contributors! Thanks to all of these amazing people!

* feat(multiprocess): restart child processes if they are not alive by gostilovichd in https://github.com/airtai/faststream/pull/1550
* fix: use typing_extensions.TypedDict import by Lancetnik in https://github.com/airtai/faststream/pull/1575
* fix: correct single dataclass argument AsyncAPI payload generation by Lancetnik in https://github.com/airtai/faststream/pull/1591
* fix (1598): use config with NATS PullSub by Lancetnik in https://github.com/airtai/faststream/pull/1599
* feat: default call_name for broker.subscriber by KrySeyt in https://github.com/airtai/faststream/pull/1589
* Feat: init ping method by Flosckow in https://github.com/airtai/faststream/pull/1592
* chore: bump nats-py requirement by Lancetnik in https://github.com/airtai/faststream/pull/1600
* fix: add pattern checking by spataphore1337 in https://github.com/airtai/faststream/pull/1590

New Contributors

* gostilovichd made their first contribution in https://github.com/airtai/faststream/pull/1550
* KrySeyt made their first contribution in https://github.com/airtai/faststream/pull/1589
* Flosckow made their first contribution in https://github.com/airtai/faststream/pull/1592

**Full Changelog**: https://github.com/airtai/faststream/compare/0.5.14...0.5.15

0.5.14

What's Changed
* Update Release Notes for 0.5.13 by faststream-release-notes-updater in https://github.com/airtai/faststream/pull/1548
* Add allow_auto_create_topics to make automatic topic creation configurable by kumaranvpl in https://github.com/airtai/faststream/pull/1556


**Full Changelog**: https://github.com/airtai/faststream/compare/0.5.13...0.5.14

0.5.13

What's Changed

* feat: nats filter JS subscription support by Lancetnik in https://github.com/airtai/faststream/pull/1519
* fix: correct RabbitExchange processing by OTEL in broker.publish case by Lancetnik in https://github.com/airtai/faststream/pull/1521
* fix: correct Nats ObjectStorage get file behavior inside watch subscriber by Lancetnik in https://github.com/airtai/faststream/pull/1523
* Resolve Issue 1386, Add rpc_prefix by aKardasz in https://github.com/airtai/faststream/pull/1484
* fix: correct spans linking in batches case by draincoder in https://github.com/airtai/faststream/pull/1532
* fix (1539): correct anyio.create_memory_object_stream annotation by Lancetnik in https://github.com/airtai/faststream/pull/1541
* fix: correct publish_coverage CI by Lancetnik in https://github.com/airtai/faststream/pull/1536
* Add NatsBroker.new_inbox() by maxalbert in https://github.com/airtai/faststream/pull/1543
* fix (1544): correct Redis message nack & reject signature by Lancetnik in https://github.com/airtai/faststream/pull/1546

New Contributors
* aKardasz made their first contribution in https://github.com/airtai/faststream/pull/1484
* maxalbert made their first contribution in https://github.com/airtai/faststream/pull/1543

**Full Changelog**: https://github.com/airtai/faststream/compare/0.5.12...0.5.13

Page 3 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.