Skip to content

Commit

Permalink
Merge pull request #581 from Lancetnik/master
Browse files Browse the repository at this point in the history
mv Propan mention to FastStream
  • Loading branch information
mosquito committed Apr 24, 2024
2 parents 848c025 + 9b796b3 commit b610628
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
23 changes: 12 additions & 11 deletions README.rst
Expand Up @@ -338,32 +338,33 @@ And the caller side might be written like this:
))
`Propan`_:fire:
`FastStream`_
---------------

**Propan** is a powerful and easy-to-use Python framework for building event-driven applications that interact with any MQ Broker.
**FastStream** is a powerful and easy-to-use Python library for building asynchronous services that interact with event streams..

If you need no deep dive into **RabbitMQ** details, you can use more high-level **Propan** interfaces:
If you need no deep dive into **RabbitMQ** details, you can use more high-level **FastStream** interfaces:

.. code-block:: python
from propan import PropanApp, RabbitBroker
from faststream import FastStream
from faststream.rabbit import RabbitBroker
broker = RabbitBroker("amqp://guest:guest@localhost:5672/")
app = PropanApp(broker)
@broker.handle("user")
app = FastStream(broker)
@broker.subscriber("user")
async def user_created(user_id: int):
assert isinstance(user_id, int)
return f"user-{user_id}: created"
@app.after_startup
async def pub_smth():
assert (
await broker.publish(1, "user", callback=True)
await broker.publish(1, "user", rpc=True)
) == "user-1: created"
Also, **Propan** validates messages by **pydantic**, generates your project **AsyncAPI** spec, tests application locally, RPC calls, and more.
Also, **FastStream** validates messages by **pydantic**, generates your project **AsyncAPI** spec, supports In-Memory testing, RPC calls, and more.

In fact, it is a high-level wrapper on top of **aio-pika**, so you can use both of these libraries' advantages at the same time.

Expand Down Expand Up @@ -530,7 +531,7 @@ Changes should follow a few simple rules:
.. _"thank's to" section: https://github.com/mosquito/aio-pika/blob/master/docs/source/index.rst#thanks-for-contributing
.. _Semantic Versioning: http://semver.org/
.. _aio-pika: https://github.com/mosquito/aio-pika/
.. _propan: https://github.com/Lancetnik/Propan
.. _faststream: https://github.com/airtai/faststream
.. _patio: https://github.com/patio-python/patio
.. _patio-rabbitmq: https://github.com/patio-python/patio-rabbitmq
.. _Socket.IO: https://socket.io/
Expand Down
23 changes: 12 additions & 11 deletions docs/source/index.rst
Expand Up @@ -409,32 +409,33 @@ And the caller side might be written like this:
))
`Propan`_
`FastStream`_
~~~~~~~~~

**Propan** is a powerful and easy-to-use Python framework for building event-driven applications that interact with any MQ Broker.
**FastStream** is a powerful and easy-to-use Python library for building asynchronous services that interact with event streams..

If you need no deep dive into **RabbitMQ** details, you can use more high-level **Propan** interfaces:
If you need no deep dive into **RabbitMQ** details, you can use more high-level **FastStream** interfaces:

.. code-block:: python
from propan import PropanApp, RabbitBroker
from faststream import FastStream
from faststream.rabbit import RabbitBroker
broker = RabbitBroker("amqp://guest:guest@localhost:5672/")
app = PropanApp(broker)
@broker.handle("user")
app = FastStream(broker)
@broker.subscriber("user")
async def user_created(user_id: int):
assert isinstance(user_id, int)
return f"user-{user_id}: created"
@app.after_startup
async def pub_smth():
assert (
await broker.publish(1, "user", callback=True)
await broker.publish(1, "user", rpc=True)
) == "user-1: created"
Also, **Propan** validates messages by **pydantic**, generates your project **AsyncAPI** spec, tests application locally, RPC calls, and more.
Also, **FastStream** validates messages by **pydantic**, generates your project **AsyncAPI** spec, supports In-Memory testing, RPC calls, and more.

In fact, it is a high-level wrapper on top of **aio-pika**, so you can use both of these libraries' advantages at the same time.

Expand Down Expand Up @@ -531,7 +532,7 @@ This software follows `Semantic Versioning`_


.. _Semantic Versioning: http://semver.org/
.. _propan: https://github.com/Lancetnik/Propan
.. _faststream: https://github.com/airtai/faststream
.. _patio: https://github.com/patio-python/patio
.. _patio-rabbitmq: https://github.com/patio-python/patio-rabbitmq
.. _Socket.IO: https://socket.io/
Expand Down

0 comments on commit b610628

Please sign in to comment.