Releases: Lancetnik/Propan
0.1.1.0 (2023-05-18) Redis
Propan added support for Redis Pub/Sub as a message broker. This functionality is fully tested and described in the documentation.
RedisBroker supports:
- message delivery by key or pattern
- test client, without the need to run Redis
- RPC requests over Redis Pub/Sub
- FastAPI Plugin
Also, Propan CLI is able to generate templates to any supported broker
propan create async [broker] [APPNAME]
0.1.0.0 (2023-05-15) STABLE
Stable and fully documented Propan release!
From the current release, no more breaking changes - use the framework safely!
At the current release, all RabbitMQ use cases are supported, tested, and described in the documentation.
Expect support for Redis (testing now), Kafka (in development), and full support for Nats (also in development) soon.
0.0.9.4 (2023-05-01)
Great news! Now Propan can be used as a full part of FastAPI!
from fastapi import FastAPI
from propan.fastapi import RabbitRouter
app = FastAPI()
router = RabbitRouter("amqp://guest:guest@localhost:5672")
@router.event("test")
async def hello(m: dict) -> dict:
return { "response": "Hello Propan!" }
app.include_router(router)
You can find a complete example in documentation
Also, added the ability to test your application without running external dependencies as a broker (for now only for RabbitMQ)!
from propan import RabbitBroker
from propan.test import TestRabbitBroker
broker = RabbitBroker()
@broker.handler("ping")
async def healthcheck(msg: str) -> str:
return "pong"
def test_publish():
async with TestRabbitBroker(broker) as test_broker:
await test_broker.start()
r = await test_broker.publish("ping", queue="ping", callback=True)
assert r == "pong"
Also added support for RPC over MQ (RabbitMQ only for now): return
of your handler function will be sent in response to a message if a response is expected.
Breaking changes:
- Brokers
publish_message
method has been renamed topublish
- removed
declare
argument inRabbitQueue
andRabbitExchange
- now you need to usepassive
0.0.9 (2023-04-18)
Migrate to FastDepends DI system
Release is timed to accompany the release of fast-depends.
Now it's used as the Propan Dependency Injection system deep inside. Context is an fast-depends CustomField child now.
Features:
- Deep
Depends
nesting - More flexable
Context
behavior - Full tested and stable decorating system
- Add
propan.annotation
module to faster access to already declared context fields
Breaking changes
@use_context
was removed. Use@apply_types
to solveContext
nowAlias
was merged with theContext
field- Access to context fields is not granted by function arguments decalration anymore
Now you should use the following code:
from propan import Context, apply_types
@apply_types
def func(logger = Context()): ...
# or
from propan import Context, apply_types
@apply_types
def func(l = Context("logger")): ...
# or
from propan import apply_types
from propan.annotations import Logger
@apply_types
def func(logger: Logger): ...
0.0.8 (2023-04-05) INITIAL
2023-04-05 Propan INITIAL
Hello there! Congratulate everybody and me with the first stable Propan release!
Release features:
Stable
- async RabbitMQ broker
- depedencies injection features
- type casting
- CLI tool
Experimental
As an experimental feature in this release was added NATS (not Jetstream) supporting.
Next steps
Features
- Full NATS supporting (with Jetstream)
- Syncronous version of all brokers and app
- Kafka brokers
Project
- boost test coverage to 100%
- setup linting, autoformatting and other environment
- setup github actions to automate build, test and publish
- full-feature documentation