This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A service for placing prioritised packages with expiry times on a queue and having a consumer notified of the packages

How it works

This service monitors a Redis sorted set and calls a consumer function when a new package arrives or the current highest priority package expires. The consumer function can be a regular Python function or an asyncio coroutine.

How to install

pip install kamikaze

The consumer function

The consumer function is the function that is called when a new message comes to the top of the queue. The function should be of the format:

def consumer_function(package, *args):
    """
    Does stuff with packages and optional args passed from the command line
    """

Long running consumer functions

If the consumer function is long running then it should yield control of the loop when possible. Otherwise the kamikaze service will be slow to react to changes in the queue.

Fast running consumer function

If the consumer function is fast then there will be no need to yield control to the main loop until it is complete.

Running the service

Start the service by running the following:

kamikaze service <consumer-function-path> --consumer-function-args

The consumer function should be the full path to the python coroutine. It must be in your $PYTHONPATH.

Give the --help flag for a full list of options.

Tools

Pushing a Package

Use the push command to add a package to the queue:

kamikaze push <payload> <ttl> <priority>

Removing a Package

Use the remove command to remove a package from the queue:

kamikaze remove <payload>

List Packages on Queue

Use the list command to list all packages on the queue:

kamikaze list

Running the examples

Yielding example

An example of a yielding function can be run like so:

kamikaze service example_consumer.consumer.yielding_consumer_func

Blocking example

An example of a blocking function can be run like so:

kamikaze service example_consumer.consumer.blocking_consumer_func
Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
kamikaze-0.1.1-py3-none-any.whl (8.8 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Nov 20, 2014
kamikaze-0.1.1.tar.gz (9.0 kB) Copy SHA256 Checksum SHA256 Source Nov 20, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting