Skip to main content

Helper library for using pika.

Project description

Pikacon is a helper library which will reduce the amount of boilerplate your software needs when it is using pika for creating connection to broker and declaring exchanges and queues.

Requirements

  • python 2.7

  • pika

Usage

Pikacon provides helper class which can be imported to your program. Class takes a path to .ini-style config file as a parameter and creates connection, exchanges, queues and bindings automatically from there. All you need to provide is a proper config.

Creation order is following:

  1. Connection

  2. Channel

  3. Exchanges

  4. Queues

  5. Bindings

Config

Pikacon uses Pythons ConfigParser to get config for connection, exchanges and queues.

Below is an example of config file:

[broker]
host = localhost
port = 5432
username = guest
password = guest

[exchange1]
config_for = exchange
type = fanout
durable = False
auto_delete = True

[queue1]
config_for = queue
durable = False
exclusive = True

[binding1]
config_for = binding
queue = queue1
exchange = exchange1
routing_key= routing

In above example config_for tells the parser what kind of config this section contains. Rest of the parameters are regular pika parameters.

Project details


Download files

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

Source Distribution

pikacon-0.2.zip (9.3 kB view details)

Uploaded Source

File details

Details for the file pikacon-0.2.zip.

File metadata

  • Download URL: pikacon-0.2.zip
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pikacon-0.2.zip
Algorithm Hash digest
SHA256 c7d4dc02dc0b578a382a5ad66a832a9ea113c6e10e92e36c4bcb965fbb6fdd3f
MD5 8bda1c2318dff6c292170469241651e1
BLAKE2b-256 58437cbebe8429b32d925fd8984a117eebc7eaf9b9c2b114b0e72d62621014be

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