Utilities for Scrapy Cluster
The scutils package is a collection of utilities that are used by the Scrapy Cluster project. These utilities are agnostic enough that they can be used by any application.
Unix based machine (Linux or OS X)
Inside a virtualenv, run pip install -U scutils. This will install the latest version of the Scrapy Cluster Utilities. If you are running a Scrapy Cluster, scutils is included inside of the requirements.txt so there is no need to install it separately.
Full documentation for the scutils package will be included as part of the Scrapy Cluster 1.1 release. Basic descriptions are below.
The argparse_helper module is used to help print top level --help arguments from argparse when used with subparsers. Useful for running applications that have multiple combinations of subcommands and command line arguments.
The log_factory module provides a standardized way for creating logs for multithreaded and concurrent process log data. It supports all log levels, stdout or to a file, and various output formats including JSON.
The method_timer module provides a simple decorator that can be added to functions or methods requiring an execution timeout period.
The redis_queue module provides 3 core queue classes which use Redis as the place to store data. Includes FIFO, Stack, and Priority Queues.
The redis_throttled_queue module provides a throttled or moderated Redis queue structure that can be used to mitigate the number of pops from the queue within a given time frame.
The settings_wrapper module is a class the handles loading of default python application settings, which can then be overridden or added to by a local settings file. In the end provides a single dictionary object of all your loaded application settings.
The stats_collector module generates Redis based statistics based on time windows or in total. Statistics collection includes time windows, rolling time windows, counters, unique counters, hyperloglog counters, and bitmap counters.
The zookeeper_watcher module provides an easy way to tell an application that it’s watched Zookeeper file has changed. It also handles Zookeeper session disconnects and reconnects behind the scenes of your application.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.