Skip to main content

Propan framework: the simplest way to work with a messaging queues

Project description

Package version downloads Supported Python versions GitHub

Propan

Propan is a modern framework for building Applications based on Messaging Architecture.

The key features are:

  • Easy: Designed to be easy to use and learn.
  • Intuitive: Great editor support. Autocompletion everywhere.
  • Dependencies management: Minimize code duplication. Multiple features from each argument and parameter declaration.
  • Greate to develop: cli tool provides great development expireince:
    • framework-independent way to rule application environment
    • application code hot reloading

Quickstart

Install using pip:

$ pip install "propan[async_rabbit]"

Basic usage

Create an application with the following code at serve.py:

from propan.app import PropanApp
from propan.brokers import RabbitBroker


broker = RabbitBroker("amqp://guest:guest@localhost:5672/")

app = PropanApp(broker)


@broker.handle("test")
async def base_handler(body):
    '''Handle all default exchange messages with `test` routing key'''
    print(body)

And just run it:

$ propan run serve:app

Project template

Also propan cli is able to generate production-ready application template:

$ propan create [projectname]

Notice: project template require pydantic[dotenv] installation.

Run created project:

# Run rabbimq first
$ docker compose --file [projectname]/docker-compose.yaml up -d

# Run project
$ propan run [projectname].app.serve:app --env=.env --reload

Now you can enjoy a new development experience!


Examples

To see more framework usages go to examples/

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

propan-0.0.7.9.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

propan-0.0.7.9-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file propan-0.0.7.9.tar.gz.

File metadata

  • Download URL: propan-0.0.7.9.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for propan-0.0.7.9.tar.gz
Algorithm Hash digest
SHA256 368ad0f4750fc57bb5026ee0923b16422eb5ad6fe680928147db8463cedd4d6c
MD5 8ca2658b38994911f5527e9e9e8f7a41
BLAKE2b-256 7f2f0e60dea50d6b51796d5f78f0c3dd7fca29be3c87e7298e598336e04b5f42

See more details on using hashes here.

File details

Details for the file propan-0.0.7.9-py3-none-any.whl.

File metadata

  • Download URL: propan-0.0.7.9-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for propan-0.0.7.9-py3-none-any.whl
Algorithm Hash digest
SHA256 9caac8a9b811a8c2aa73ce14f30389f1775fa7979944ff8c2b776d0963bee816
MD5 31161816737996ac8018fb40554faeb8
BLAKE2b-256 d3e3d1601cba5a75a5ca78a707bcaf2013c84bc2f910209a3f99812cc2b6278e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page