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

Patrol

Trigger methods from changed files - e.g. selectively rebuild your project or run tests as soon as you hit the save button on your text editor or IDE.

Patrol works well with ProjectKey.

Use

To install:

pip install patrol

Example code:

import patrol

def build(filenames):
    touch("output/build_started")
    time.sleep(2)
    touch("output/build_finished")

def run_test(filenames):
    touch("output/test_started")
    time.sleep(30)
    touch("output/test_finished")

patrol.watch([
        patrol.Trigger(
            build,
            includes=["data/*", ],
            excludes=['data/exclude/*', 'output/*', ],
        ),
        patrol.Trigger(
            run_test,
            includes=["data/*", ],
            excludes=['data/exclude/*', 'output/*', ],
            reaper=patrol.Reaper(),         # If triggered while method is in progress, this will stop it and start it again.
            fire_on_initialization=True,    # When the watch is initiated, this trigger will also fire.
        ),
    ],
    directory=os.getcwd(),            # By default it patrols the present working directory.
    lockfiles=[".git/index.lock", ],  # This will wait until git has finished its operations before firing any triggers
)

Features

  • Patrol does not use polling to detect file changes. It uses libuv, which creates event driven hooks to filesystem events using epoll, kqueue or IOCP.
  • You can queue up triggers when a specified lockfile is present - e.g. you can use to prevent triggers from firing until git operations are done.
  • Patrol comes with a customized Reaper class that can be used to specify how a process is stopped.
Release History

Release History

0.3.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.3

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.2

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

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
patrol-0.3.1.tar.gz (5.6 kB) Copy SHA256 Checksum SHA256 Source Jul 26, 2015

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