Skip to main content

Overview

Convoy is a WSGI app for loading multiple CSS and JavaScript files in one request. It’s built to be compatible with the YUI Loader.

Installation

Convoy is a Python package that is installed from pypi via easy_install or pip.

$ pip install convoy

Usage

Convoy is a WSGI application. You should create a .wsgi file that you serve out that sets up convoy for your use. You need to supply it the root path to the JS and CSS files that it’s serving out to your users.

An example .wsgi file is noted below.

from convoy.combo import combo_app

def application(environ, start_response):
    root = '/path/to/file/root'
    app = combo_app(root)
    return app(environ, start_response)

You can run this via WSGI servers such as gunicorn, Apapche mod_wsgi, etc.

Breaking down the combo loader url

There are two basic parts to finding files from your combo loader.

Root adjustments - PATH_INFO

The initial part of the route, passed into Convoy in the WSGI environment PATH_INFO variable, becomes part of the path from your root.

If you have multiple versions of files in the root, you can select which by adding the extra path info to your convoy url.

For instance, if your url is: http://127.0.0.1:8000/ver1?y/yui-min&y/loader-min It will append the ‘ver1’ to the root specified in your .wsgi file to find where the y directory should be on disk.

Combined Files

The query string is used only to find files based off the updated root path. You might want to keep the YUI files in a directory y and your own files under a directory app. In this way, the files to combine would be in the query string as: http://127.0.0.1:8000?y/yui-min&app/app-main.

Metadata

Release files for convoy 0.2.3

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

Source distribution (sdist)

Source distribution for convoy 0.2.3
File Size Uploaded
convoy-0.2.3.tar.gz 13.2 kB Details

Release files / convoy-0.2.3.tar.gz

Download URL convoy-0.2.3.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6bcc5359b458c7258d8c5e54fb4b99ce4825050bb1c84595e0feffcc78185bf5
BLAKE2b-256 checksum
How to use checksums
08667a9ef5be51715208ab8b461d263e04fec066c202e5a83c00caa9bda35925
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.4

1 release file

This release

0.2.3 This release

1 release file

0.2.2

1 release file

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