2 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
The sprockets CLI interface for running applications. Applications are meant to be run by a controller that is managed by the sprockets CLI interface.
The sprockets CLI interface loads controller applications that are registered using setuptools entry points.
Example CLI Usage
Help:
# sprockets --help
usage: sprockets [-h] [--apps] [--plugins] [-e [PLUGIN]] [-s] [-v] [--version]
CONTROLLER ... [APP]
Command line tool for starting a Sprockets application
positional arguments:
CONTROLLER Available sprockets application controllers
http HTTP Application Controller
amqp RabbitMQ Worker Controller
APP Application to run
optional arguments:
-h, --help show this help message and exit
--apps List installed applications
--plugins List installed plugins
-e [PLUGIN], --enable [PLUGIN]
Enable a plugin
-s, --syslog Log to syslog
-v, --verbose Verbose logging output, use -vv for DEBUG level
logging
--version show program's version number and exit
Find more Sprockets controllers and plugins at
https://sprockets.readthedocs.org
Starting a Web App with the NewRelic plugin:
# sprockets -e newrelic http my_web_app
Controllers
Each controller is expected to expose at least a main(application, args) method that would be invoked when starting the application. Additional, a controller can implement a add_cli_arguments(parser) method that will be invoked when setting up the command line parameters. This allows controllers to inject configuration directives into the cli.
Controller API Summary:
module.add_cli_arguments(ArgumentParser) # optional
module.main(app_module, argparse.Namespace)
Plugins
Plugins are able to inject themselves at multiple points in the application lifecycle. Plugins that implement a initialization(controller) method will see that method invoked before a controller is started. In addition, if a on_startup(controller) method is defined, it will be invoked after a Controller has started a application. Finally if a on_shutdown(controller) method is defined, it will be invoked when a controller has shutdown.
Plugin API Summary:
plugin.initialize(controller_module) # optional
plugin.on_start(controller_module) # optional
plugin.on_shutdown(controller_module) # optional
Example Entrypoints
Controller:
{'sprockets.controller': ['http=sprockets.controllers.http:None']},
Application:
{'sprockets.http.app': ['app-name=package.or.module:None']}
(Replace app-name with the name of your application)
Applications
Applications can be a python package or module and if they are registered to a specific controller, can be referenced by an alias. Application contracts vary by controller.
Release files for sprockets.cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
2 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sprockets.cli-0.1.0.tar.gz | 6.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sprockets.cli-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 15.8 kB
Release files / sprockets.cli-0.1.0.tar.gz
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | sprockets.cli-0.1.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4431e8044ff7605dc16961d9653704b21404f1cc31710bc5da8f84e1e459ee14
|
|
BLAKE2b-256 checksum How to use checksums |
252693c5de757f28f3fd27755703ae99d2ff9bb557d239653004b1d1e09c0ab4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / sprockets.cli-0.1.0-py2.py3-none-any.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | sprockets.cli-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8d2deb39d1b46de9e3d3680beda1abecfa8c50a8da8643d08266fba3e7f23e44
|
|
BLAKE2b-256 checksum How to use checksums |
55c6b2c0e5b5612ce8edda0803feccac9d8843ae07e303bcf5bd49975913edbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |