{"id":15440853,"url":"https://github.com/samuelcolvin/grablib","last_synced_at":"2026-03-16T17:31:52.949Z","repository":{"id":15562307,"uuid":"18297540","full_name":"samuelcolvin/grablib","owner":"samuelcolvin","description":"Static asset management in python","archived":false,"fork":false,"pushed_at":"2023-07-20T13:10:45.000Z","size":259,"stargazers_count":20,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-12T14:14:17.839Z","etag":null,"topics":["asset-builder","asset-pipeline","bower","grablib","javascript","python","sass"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/grablib/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samuelcolvin.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-03-31T15:11:25.000Z","updated_at":"2024-06-11T04:02:31.000Z","dependencies_parsed_at":"2025-04-19T18:45:04.894Z","dependency_job_id":"e0493afe-1d60-41b5-b4d2-75b5ca1f3a45","html_url":"https://github.com/samuelcolvin/grablib","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/samuelcolvin/grablib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelcolvin%2Fgrablib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelcolvin%2Fgrablib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelcolvin%2Fgrablib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelcolvin%2Fgrablib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samuelcolvin","download_url":"https://codeload.github.com/samuelcolvin/grablib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelcolvin%2Fgrablib/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260086613,"owners_count":22956831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asset-builder","asset-pipeline","bower","grablib","javascript","python","sass"],"created_at":"2024-10-01T19:15:34.971Z","updated_at":"2026-03-16T17:31:52.906Z","avatar_url":"https://github.com/samuelcolvin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"grablib\n=======\n\n|Build Status| |codecov.io| |PyPI Status| |license|\n\nCopyright (C) 2013-2020 Samuel Colvin\n\nKind of like bower, but in Python, and simpler, and with some more features.\n\n**grablib** can:\n\n* download files from urls, including extracting selectively from zip files.\n* create ``.grablib.lock`` which retains hashes of all downloaded files meaning assets can't change unexpectedly.\n* compile sass/scss/css using `libsass`_.\n* concatenate and minify javascript using `jsmin`_.\n\nDefinition files can either be JSON or YAML (see `examples`_).\n\nInstallation\n------------\n\ngrablib requires **python 3.6+**.\n\n.. code::\n\n    pip install grablib[build]\n\n(You can also use simply ``pip install grablib`` to install without build requirements,\nthis is useful when you're not using grablib for building as it avoids installing\n``jsmin`` and ``libsass`` which can be slow.)\n\n\nCLI Usage\n---------\n\nDefine your static files thus: (``grablib.yml``)\n\n.. code:: yaml\n\n    download_root: 'static/libs'\n    download:\n      'http://code.jquery.com/jquery-1.11.3.js': 'js/jquery.js'\n      'https://github.com/twbs/bootstrap-sass/archive/v3.3.6.zip':\n        'bootstrap-sass-3.3.6/assets/(.+)$': 'bootstrap-sass/'\n\n      'GITHUB/codemirror/CodeMirror/5.8.0/lib/codemirror.js': 'codemirror/'\n      # simple scss file to import and compile bootstrap from above,\n      # generally this would be in your code\n      # this file just reads \"@import 'bootstrap-sass/stylesheets/bootstrap';\"\n      'https://git.io/v1Z5J': 'build_bootstrap.scss'\n\n    debug: true\n    build_root: 'static/prod'\n    build:\n      # delete the entire static/prod directory before building, this is required for sass,\n      # and generally safer\n      wipe: '.*'\n      cat:\n        # concatenate jquery and codemirror into \"libraries.js\"\n        # it won't get minified as debug is true, but without that it would\n        'libraries.js':\n          - 'DL/js/jquery.js'\n          - 'DL/codemirror/codemirror.js'\n      sass:\n        # compile all css, scss and sass files which don't start with _ from the \"download_root\"\n        # into the \"css\" directory, here that will just be build_bootstrap.scss which will\n        # build the whole of bootstrap.\n        # debug: true means you'll get map files and a copy of sass files so maps work properly.\n        'css': 'DL/'\n\nThen download and build you static files with just:\n\n.. code::\n\n    grablib\n\nLibrary Usage\n-------------\n\nYou can also call grablib from python:\n\n.. code:: python\n\n    from grablib import Grab\n\n    grab = Grab('path/to/definitions.json|yml')\n    grab.download()\n    grab.build()\n\n.. |Build Status| image:: https://github.com/samuelcolvin/grablib/workflows/CI/badge.svg\n   :target: https://github.com/samuelcolvin/grablib/actions?query=workflow%3ACI\n.. |codecov.io| image:: http://codecov.io/github/samuelcolvin/grablib/coverage.svg?branch=master\n   :target: http://codecov.io/github/samuelcolvin/grablib?branch=master\n.. |PyPI Status| image:: https://img.shields.io/pypi/v/grablib.svg?style=flat\n   :target: https://pypi.python.org/pypi/grablib\n.. |license| image:: https://img.shields.io/pypi/l/grablib.svg\n   :target: https://github.com/samuelcolvin/grablib\n.. _libsass: https://pypi.python.org/pypi/libsass/0.11.2\n.. _jsmin: https://github.com/tikitu/jsmin\n.. _examples: examples\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelcolvin%2Fgrablib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelcolvin%2Fgrablib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelcolvin%2Fgrablib/lists"}