Skip to main content

Bottle-Pika is a plugin that integrates Pika (AMQP) with your Bottle application. It automatically connects to AMQP at the beginning of a request, passes the channel to the route callback and closes the connection and channel afterwards.

To automatically detect routes that need a channel, the plugin searches for route callbacks that require a mq keyword argument (configurable) and skips routes that do not. This removes any overhead for routes that don’t need a message queue.

This plugin was originally based on the bottle-mysql plugin found at:

https://pypi.python.org/pypi/bottle-mysql

Usage Example:

import bottle
import bottle_pika
import pika

app = bottle.Bottle()
pika_plugin = bottle_pika.Plugin(pika.URLParameters('amqp://localhost/'))
app.install(pika_plugin)

@app.route('/hello')
def hello(mq):
    mq.basic_publish(...)
    return HTTPResponse(status=200)
See pika documentation on channels for more information:

http://pika.readthedocs.org/en/latest/modules/channel.html#pika.channel.Channel

Metadata

Release files for bottle_pika 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bottle_pika 0.1.0
File Size Uploaded Provenance
bottle_pika-0.1.0.tar.gz 2.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bottle_pika 0.1.0
File Interpreter ABI Platform
bottle_pika-0.1.0-py2.7.egg Legacy Egg format - - Details

Total release size: 7.6 kB

Release files / bottle_pika-0.1.0.tar.gz

Download URL bottle_pika-0.1.0.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4d55b23be8dc93dfdd843fbcff88cc6e059503b4a28a470e261b0a8f4dec3534
BLAKE2b-256 checksum
How to use checksums
d85e324e1f1eb41c1efc78a6f9a1421f86ee2cb62f00c1e09809c8cd9dbac172
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / bottle_pika-0.1.0-py2.7.egg

Download URL bottle_pika-0.1.0-py2.7.egg
Size 5.0 kB
Tags Egg
SHA-256 checksum
How to use checksums
fc2e5cf1375fadd33a532e1eb0f302a677f01baecdcdab38b74291316d412828
BLAKE2b-256 checksum
How to use checksums
eb3a314a71de9b28f0d13cdc7429a1e13fafd61c024d14192ff6f93bf689ec71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for bottle_pika 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page