Flask-RangeRequest
Flask-RangeRequest adds range request (RFC 7233) support to your Flask app.
Example
from datetime import datetime
from flask import Flask
from flask_rangerequest import RangeRequest
from os import path
my_file = '/path/to/file'
app = Flask(__name__)
size = path.getsize(my_file)
with open(my_file, 'rb') as f:
etag = RangeRequest.make_etag(f)
last_modified = datetime.utcnow()
@app.route('/', methods=('GET', 'POST'))
def index():
return RangeRequest(open(my_file, 'rb'),
etag=etag,
last_modified=last_modified,
size=size).make_response()
if __name__ == '__main__':
app.run(host='127.0.0.1', port=8080, debug=True)
License
This work is dual licensed under the MIT and Apache-2.0 licenses. See LICENSE-MIT and LICENSE-APACHE for details.
Metadata
Release files for Flask-RangeRequest 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Flask-RangeRequest-0.0.2.tar.gz | 8.5 kB | Without provenance | Details for Flask-RangeRequest-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Flask_RangeRequest-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for Flask_RangeRequest-0.0.2-py3-none-any.whl |
Total release size: 18.0 kB
Release files / Flask-RangeRequest-0.0.2.tar.gz
| Download URL | Flask-RangeRequest-0.0.2.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c27507dcda610c9bf94c9ffd4408afcfae33cd86baa073988a951428a8972b40
|
|
BLAKE2b-256 checksum How to use checksums |
0938081ebf56ab6caf988f4c239345c2356dbec70ec7c7160ed176d5e34023e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3
|
Release files / Flask_RangeRequest-0.0.2-py3-none-any.whl
| Download URL | Flask_RangeRequest-0.0.2-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90e0c3d26a494a083b6c87e0b16f2ed21d90719d0c51441ed27cfa922c08db81
|
|
BLAKE2b-256 checksum How to use checksums |
82b040c91c8d0ee0889c2b4e4b8c37c4c399ce5fe2bebb3d98a3ef259ad94683
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3
|
Security for Flask-RangeRequest 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.