{ "info": { "author": "Michael Chisari", "author_email": "", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: Internet :: WWW/HTTP :: Session" ], "description": "sanic_brogz\n===========\n\nsanic_brogz is an extension which allows you to easily brotli compress\nor gzip your Sanic responses. It is a fork of the\n`sanic_compress `__ package\nwhich is a port of the\n`Flask-Compress `__\nextension.\n\nInstallation\n------------\n\nInstall with ``pip``:\n\n``pip install sanic_brogz``\n\nUsage\n-----\n\nUsage is simple. Simply pass in the Sanic app object to the ``Compress``\nclass, and responses will be brotli compressed or gzipped.\n\n.. code:: python\n\n from sanic import Sanic\n from sanic_brogz import Compress\n\n app = Sanic(__name__)\n Compress(app)\n\nOptions\n-------\n\nWithin the Sanic application config you can provide the following\nsettings to control the behavior of sanic_brogz. None of the settings\nare required.\n\n``COMPRESS_MIMETYPES``: Set the list of mimetypes to compress here. -\nDefault:\n``{'text/html','text/css','text/xml','application/json','application/javascript'}``\n\n``COMPRESS_LEVEL``: Specifies the gzip compression level (1-9) or brotli\ncompression level (1-11). - Default: ``6``\n\n``COMPRESS_MIN_SIZE``: Specifies the minimum size (in bytes) threshold\nfor compressing responses. - Default: ``500``\n\nA higher ``COMPRESS_LEVEL`` will result in a gzipped response that is\nsmaller, but the compression will take longer.\n\nExample of using custom configuration:\n\n.. code:: python\n\n from sanic import Sanic\n from sanic_brogz import Compress\n\n app = Sanic(__name__)\n app.config['COMPRESS_MIMETYPES'] = {'text/html', 'application/json'}\n app.config['COMPRESS_LEVEL'] = 4\n app.config['COMPRESS_MIN_SIZE'] = 300\n Compress(app)\n\nNote about compressing static files:\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSanic is not at heart a file server. You should consider serving static\nfiles with nginx or on a separate file server.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/bitpartio/sanic_brogz", "keywords": "sanic,gzip,brotli", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sanic-brogz", "package_url": "https://pypi.org/project/sanic-brogz/", "platform": "", "project_url": "https://pypi.org/project/sanic-brogz/", "project_urls": { "Homepage": "http://github.com/bitpartio/sanic_brogz" }, "release_url": "https://pypi.org/project/sanic-brogz/0.1.3/", "requires_dist": [ "sanic", "brotli" ], "requires_python": "", "summary": "An extension which allows you to easily brotli compress or gzip your Sanic responses.", "version": "0.1.3" }, "last_serial": 4400682, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "aada6f10e09190c7f94e47995a332985", "sha256": "7e8e8c5a7296a1ba5379476bfc1137114b7b5f3df3e196678098167693103bea" }, "downloads": -1, "filename": "sanic_brogz-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "aada6f10e09190c7f94e47995a332985", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3022, "upload_time": "2018-10-21T08:02:13", "url": "https://files.pythonhosted.org/packages/e0/23/7f06e5e7ad31bb144714625fc530176150fceb953a9e141fa63ed3e6645a/sanic_brogz-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "38e6d98dc262d4222aa3bd7468c3fb9f", "sha256": "80a625917f3334a3e8c500d5c2617ca29e64d324e2d3415c7e84e647be01026c" }, "downloads": -1, "filename": "sanic_brogz-0.1.1.tar.gz", "has_sig": false, "md5_digest": "38e6d98dc262d4222aa3bd7468c3fb9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2544, "upload_time": "2018-10-21T08:02:15", "url": "https://files.pythonhosted.org/packages/8d/2b/1f1180291be7577db1c1ebd9ce79a8d2c7dfd850b328e1ba5b5ffdb6dc33/sanic_brogz-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "658bdda331e4c8882d08ff9d643c5574", "sha256": "aad33201973e69493bb842b77a8cddfd44e1e7a64c5811cfb3b45100e56b274d" }, "downloads": -1, "filename": "sanic_brogz-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "658bdda331e4c8882d08ff9d643c5574", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3073, "upload_time": "2018-10-21T22:29:27", "url": "https://files.pythonhosted.org/packages/65/6f/718c25890b3ae4a43f46f5d9c8798f436aa7c227101bca40979b6bb039c9/sanic_brogz-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "86dc03d2fec4cf78f4af3e9514dd8430", "sha256": "f491ae10e1c52855e2d63fceec0788f9f5d3839a7a48ca4045e66782f462fb4a" }, "downloads": -1, "filename": "sanic_brogz-0.1.2.tar.gz", "has_sig": false, "md5_digest": "86dc03d2fec4cf78f4af3e9514dd8430", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2594, "upload_time": "2018-10-21T22:29:28", "url": "https://files.pythonhosted.org/packages/00/de/712f8e10f7834aa44956f4db986035d29c9024da79632a900b23154f3075/sanic_brogz-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7a145b534c9391bb2b96d65e0cedbccc", "sha256": "7b1f39911df234ebdd4609f0175667610abbbef65ab949d997ecee0f77c04563" }, "downloads": -1, "filename": "sanic_brogz-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7a145b534c9391bb2b96d65e0cedbccc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3797, "upload_time": "2018-10-21T22:39:06", "url": "https://files.pythonhosted.org/packages/58/12/fc246d1058cae149b6d4063edb7b46501d5af2d87a749e3c3eae772a2f29/sanic_brogz-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c973b985f1e38111ff0b8ef624b4eac", "sha256": "74b40833eaad6f65c20a27e6d252bc477dc533f3774c99ba1cabf306b75e39d7" }, "downloads": -1, "filename": "sanic_brogz-0.1.3.tar.gz", "has_sig": false, "md5_digest": "8c973b985f1e38111ff0b8ef624b4eac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2921, "upload_time": "2018-10-21T22:39:08", "url": "https://files.pythonhosted.org/packages/05/f0/c7ea802b04616423f0e2c52881a68071947fa3858cb32c595e812bc4ecf9/sanic_brogz-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7a145b534c9391bb2b96d65e0cedbccc", "sha256": "7b1f39911df234ebdd4609f0175667610abbbef65ab949d997ecee0f77c04563" }, "downloads": -1, "filename": "sanic_brogz-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7a145b534c9391bb2b96d65e0cedbccc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3797, "upload_time": "2018-10-21T22:39:06", "url": "https://files.pythonhosted.org/packages/58/12/fc246d1058cae149b6d4063edb7b46501d5af2d87a749e3c3eae772a2f29/sanic_brogz-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c973b985f1e38111ff0b8ef624b4eac", "sha256": "74b40833eaad6f65c20a27e6d252bc477dc533f3774c99ba1cabf306b75e39d7" }, "downloads": -1, "filename": "sanic_brogz-0.1.3.tar.gz", "has_sig": false, "md5_digest": "8c973b985f1e38111ff0b8ef624b4eac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2921, "upload_time": "2018-10-21T22:39:08", "url": "https://files.pythonhosted.org/packages/05/f0/c7ea802b04616423f0e2c52881a68071947fa3858cb32c595e812bc4ecf9/sanic_brogz-0.1.3.tar.gz" } ] }