{ "info": { "author": "quantum", "author_email": "quantum2048@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: Site Management", "Topic :: System :: Systems Administration", "Topic :: Utilities" ], "description": "# `purge-static` [![PyPI](https://img.shields.io/pypi/v/purge-static.svg)](https://pypi.org/project/purge-static/) [![PyPI - Format](https://img.shields.io/pypi/format/purge-static.svg)](https://pypi.org/project/purge-static/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/purge-static.svg)](https://pypi.org/project/purge-static/)\r\n\r\n`purge-static` is a tool to find changed static files, show their URLs,\r\nand optionally purge them for you on your CDN, such as CloudFlare.\r\n\r\nWith `purge-static`, you can enable aggressive caching for your static\r\nsite on your CDN, caching the entire site on the CDN edge. When you update\r\nyour site, you simply need to use `purge-static` to purge only the changed\r\nfiles.\r\n\r\n`purge-static` uses the SHA256 hash of files to determine if they changed.\r\n\r\n## Installation\r\n\r\n```\r\npip install purge-static\r\n```\r\n\r\n## Example Invocation\r\n\r\n```sh\r\npurge-static -d /path/to/my/webroot -u https://example.com\r\n```\r\n\r\nIf your webroot is not writable, you can select a different path to write\r\nthe hash store with `--store /path/to/a/file/to/store/hashes`.\r\n\r\nThis example ignores all `.gz` files, since they are only used for `nginx`'s\r\n`gzip_static` module, as well as all files with hash already in the name:\r\n\r\n```sh\r\npurge-static -d /path/to/my/webroot -u https://example.com \\\r\n -i '.*\\.gz$|.*-[0-9a-f]{64}\\.'\r\n```\r\n\r\nFor more detailed description of the arguments, run `purge-static --help`.\r\n\r\n## CloudFlare\r\n\r\nTo use CloudFlare, you will need to create a credentials file:\r\n\r\n```json\r\n{\r\n \"email\": \"you@example.com\",\r\n \"api_key\": \"myverysecretapikey\"\r\n}\r\n```\r\n\r\nThen, you can invoke `purge-static`:\r\n\r\n```sh\r\npurge-static -d /path/to/my/webroot -u https://example.com \\\r\n --cloudflare -c /path/to/my/credentiails -z mycloudflarezoneid\r\n```\r\n\r\nNote that `-z` takes the CloudFlare zone ID as 32 hex digits.\r\n\r\n\r\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/quantum5/purge-static", "keywords": "cloudflare cdn static cache purge", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "purge-static", "package_url": "https://pypi.org/project/purge-static/", "platform": "", "project_url": "https://pypi.org/project/purge-static/", "project_urls": { "Homepage": "https://github.com/quantum5/purge-static" }, "release_url": "https://pypi.org/project/purge-static/0.1/", "requires_dist": [ "requests", "six" ], "requires_python": "", "summary": "Find changed static files, show their URLs, and optionally purge them for you on your CDN.", "version": "0.1" }, "last_serial": 4557768, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "4c3ff6f9654279dec4eddf00c88f2b62", "sha256": "e1eb6f4291f918f2d2053a1d1e20ab6280865b25e51c70e77d0ad66d24222b6f" }, "downloads": -1, "filename": "purge_static-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4c3ff6f9654279dec4eddf00c88f2b62", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5646, "upload_time": "2018-12-03T23:43:13", "url": "https://files.pythonhosted.org/packages/a1/f0/73d9352b6765512be09745db5a7489aa3604614c1e377ee0621be651eceb/purge_static-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2f81220092617d036f5f8f305cfe92ed", "sha256": "68a4a4ad9d42db84fb969b8e7e92bd92505615eaaba811ed7dc0ebe47905a9d6" }, "downloads": -1, "filename": "purge-static-0.1.tar.gz", "has_sig": false, "md5_digest": "2f81220092617d036f5f8f305cfe92ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5288, "upload_time": "2018-12-03T23:43:15", "url": "https://files.pythonhosted.org/packages/6d/71/e56d5549aa24f0bdfdf1de921f0425a966ea3e71b426032b60063aacbf34/purge-static-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4c3ff6f9654279dec4eddf00c88f2b62", "sha256": "e1eb6f4291f918f2d2053a1d1e20ab6280865b25e51c70e77d0ad66d24222b6f" }, "downloads": -1, "filename": "purge_static-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4c3ff6f9654279dec4eddf00c88f2b62", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5646, "upload_time": "2018-12-03T23:43:13", "url": "https://files.pythonhosted.org/packages/a1/f0/73d9352b6765512be09745db5a7489aa3604614c1e377ee0621be651eceb/purge_static-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2f81220092617d036f5f8f305cfe92ed", "sha256": "68a4a4ad9d42db84fb969b8e7e92bd92505615eaaba811ed7dc0ebe47905a9d6" }, "downloads": -1, "filename": "purge-static-0.1.tar.gz", "has_sig": false, "md5_digest": "2f81220092617d036f5f8f305cfe92ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5288, "upload_time": "2018-12-03T23:43:15", "url": "https://files.pythonhosted.org/packages/6d/71/e56d5549aa24f0bdfdf1de921f0425a966ea3e71b426032b60063aacbf34/purge-static-0.1.tar.gz" } ] }