Propan

Latest version: v0.1.5.26

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

Scan your dependencies

Page 1 of 3

0.1.5.17

What's Changed

* DOCS: add Discord widget link to README.md & add a disclaimer about semantic commit messages by spectacularfailure in https://github.com/Lancetnik/Propan/pull/111
* Docs tweaks by maxalbert in https://github.com/Lancetnik/Propan/pull/117
* fix: fix bitnami/kafka container version by Lancetnik in https://github.com/Lancetnik/Propan/pull/121
* feat: add setup_state flag to FastAPI Router to be comaptible with ol… by Lancetnik in https://github.com/Lancetnik/Propan/pull/122


**Full Changelog**: https://github.com/Lancetnik/Propan/compare/0.1.5.15...0.1.5.17

0.1.5.15

What's Changed

Added detail exceptions traceback, fix FastAPI yield dependencies support, fix an empty RMQ message_id parsing, fix some routers' erros, add kafka `publish_batch` method and some other fixes.

Also:

* Docs typo fixes by tatzati in https://github.com/Lancetnik/Propan/pull/97
* refactoring by tatzati in https://github.com/Lancetnik/Propan/pull/99
* Fix docs by tatzati in https://github.com/Lancetnik/Propan/pull/102
* docs: update invalid RPC docs link by spectacularfailure in https://github.com/Lancetnik/Propan/pull/104
* Fix typos in docs by maxalbert in https://github.com/Lancetnik/Propan/pull/105
* Fix nats docs typos by floscha in https://github.com/Lancetnik/Propan/pull/107

New Contributors
* tatzati made their first contribution in https://github.com/Lancetnik/Propan/pull/97
* spectacularfailure made their first contribution in https://github.com/Lancetnik/Propan/pull/104
* maxalbert made their first contribution in https://github.com/Lancetnik/Propan/pull/105
* floscha made their first contribution in https://github.com/Lancetnik/Propan/pull/107

**Full Changelog**: https://github.com/Lancetnik/Propan/compare/0.1.5.0...0.1.5.15

0.1.5.0

Nast Persistent layer

This update adds **NATS JetStream** (a persistent layer of **NATS**) supporting.

Now you can work with this great broker without fear of losing messages, using the acknowledgment confirmation mechanism and the built-in `key-value` and `object` storages.

Also, some internal classes were changed to further create a synchronous interfaces based on them.

A new section in README: Contibutors!

<a href="https://github.com/Lancetnik/Propan/graphs/contributors">
<img src="https://contrib.rocks/image?repo=Lancetnik/Propan"/>
</a>

bodograumann v-sopov hbrooks sallory, thank you, guys!

0.1.4.0

The main change in this update is the support for the **PydanticV2** beta version.

Also, this update **still supports Pydantic v1**, so if something with **PydanticV2** breaks you can simply roll it back - the latest **Propan** continues to work without changes.

Be careful: if you use **Propan** together with **FastAPI** when migrating to **PydanticV2**, you must install the version `fastapi>=0.100.0b1`, which is also compatible with both versions of **Pydantic**. However, if you are working on versions of **FastAPI** `0.9*`, the current release is compatible with them as well (but only using **PydanticV1**).

All test suites work correctly with all variations of the dependencies and on all supported Python versions.

Other changes:

Improved compatibility with **FastAPI**:

* **PropanRouter** supports top-level dependencies
python
from propan.fastapi import RabbitRouter

router = RabbitRouter(dependencies=[...])
router.event("test", dependencies=[...])
async def handler(a: str, b: int):
...


* You can test `router.event` using [`build_message`](https://lancetnik.github.io/Propan/getting_started/7_testing/#regular-function-calling) directly
python
import pytest, pydantic
from propan.fastapi import RabbitRouter
from propan.test.rabbit import build_message

router = RabbitRouter()

router.event("test")
async def handler(a: str, b: int):
...

with pytest.raises(pydantic.ValidationError):
handler(build_message("Hello", "test"), reraise_exc=True)


Implemented [**BrokerRouter**](https://lancetnik.github.io/Propan/getting_started/4_broker/2_routing/#brokerrouter) for the convenience of splitting the application code into imported submodules.

python
from propan import RabbitBroker, RabbitRouter

router = RabbitRouter(prefix="user/")

router.handle("created")
async def handle_user_created_event(user_id: str):
...

broker = RabbitBroker()
broker.include_router(router)


Added documentation [section](https://lancetnik.github.io/Propan/getting_started/4_broker/4_custom_serialization/) about custom message serialization (using the example with *Protobuf*).

And also updated several other sections of the documentation, fixed several non-critical bugs, removed **RabbitBroker** *deprecated* methods, and increased test coverage of rare scenarios.

0.1.3.5

What's Changed

* Use [`amq.rabbitmq.reply-to`](https://www.rabbitmq.com/direct-reply-to.html) to implement RPC by Lancetnik in https://github.com/Lancetnik/Propan/pull/72
* Use pydantic.Field title and description in AsyncAPI scheme by Lancetnik in https://github.com/Lancetnik/Propan/pull/73

Now you can use `pydantic.Field` to describe your arguments in AsyncAPI spec

python
from pydantic import Field

broker.handle(...)
async def handler(
user_id: str = Field(title="DBUserId", description="UserId at main Postgres")
): ...


**Full Changelog**: https://github.com/Lancetnik/Propan/compare/0.1.3.0...0.1.3.5

0.1.3.0

The current update adds functionality that I've been working hard on for the last month:
Now **Propan** can automatically generate and host documentation for your application
according to the [**AsyncAPI**](https://www.asyncapi.com/) specification.

You can simply provide related teams with a link to your documentation page, where they can get acquainted with all the parameters of the server used, channels, and the format of messages consumed by your service.

![HTML-page](https://lancetnik.github.io/Propan/assets/img/docs-html-short.png)

You can learn more about this functionality in the corresponding [documentation section] (getting_started/9_documentation.md).

Also, the ability to determine a broker and consumers level dependencies has been added.:

python
from propan import RabbitBroker, Depends

broker = RabbitBroker(dependencies=[Depends(...)])

broker.handler(..., dependencies=[Depends(...)])
async def handler():
...


**Full Changelog**: https://github.com/Lancetnik/Propan/compare/0.1.2.17...0.1.3.0

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.