skip to navigation
skip to content

Not Logged In

grablib 0.1.9

Utility for defining then downloading, concatenating and minifying your project's external static files

Copyright (C) 2013-2015 Samuel Colvin

Python tool and library for downloading, concatenating and minifying external static files. Minification works with both javascript via jsmin and css via csscompressor.

Definition files can either be JSON or Python (see examples). So the versions of libraries used in your project can be defined in version control without the need for files from external projects.

CLI Usage

Define your static files thus: (grablib.json)

  "download_root": "static_files",
    "github": "",
    "typeahead": "{{ github }}/twitter/typeahead.js/v0.10.2/dist"
    "{{ typeahead }}/typeahead.jquery.js": "js/ta_raw/{{ filename }}",
    "{{ typeahead }}/bloodhound.js": "js/ta_raw/{{ filename }}",
    "{{ github }}/twbs/bootstrap/v3.3.5/dist/css/bootstrap.min.css": "{{ filename }}",
    "{{ github }}/twbs/bootstrap/v3.3.5/dist/js/bootstrap.min.js": "{{ filename }}"
  "minified_root": "static_files/minified",
    "typeahead_combined.min.js": [".*/ta_raw/.*"]

Then download and minify you static files with just:


Library Usage

You can also call grablib from python:

import grablib


# or with options overridden
grablib.grab('path/to/definitions.json|py', verbosity=3)
File Type Py Version Uploaded on Size
grablib-0.1.9.tar.gz (md5) Source 2015-07-15 8KB
  • Downloads (All Versions):
  • 40 downloads in the last day
  • 195 downloads in the last week
  • 1033 downloads in the last month