A Tus (tus.io) library for Django Rest Framework
Project description
A Tus (tus.io) library for Django Rest Framework
Documentation
The full documentation is at https://drf-tus.readthedocs.io.
Quickstart
Install drf-tus:
pip install drf-tus
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
'rest_framework_tus',
...
)
Add the middleware to MIDDLEWARE (or MIDDLEWARE_CLASSES for Django < 1.10)
MIDDLEWARE = (
...
'rest_framework_tus.middleware.TusMiddleware',
...
)
Add drf-tus’s URL patterns:
urlpatterns = [
...
url(r'^', include('rest_framework_tus.urls', namespace='rest_framework_tus')),
...
]
Features
This library implements the following TUS API v1.0.0 protocols:
Core Protocol (http://tus.io/protocols/resumable-upload.html#core-protocol)
Creation Protocol (http://tus.io/protocols/resumable-upload.html#creation)
Expiration Protocol (http://tus.io/protocols/resumable-upload.html#expiration)
Checksum Protocol (http://tus.io/protocols/resumable-upload.html#checksum)
Termination Protocol (http://tus.io/protocols/resumable-upload.html#termination)
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Credits
Tools used in rendering this package:
History
1.14 (2017-03-30)
Updated default behaviour of the get_header handler in TusMiddleware.
1.13 (2017-03-30)
Implemented handler for retrieving request headers in TusMiddleware.
1.12 (2017-03-10)
Updated validate_chunk signature
1.11 (2017-03-10)
Implemented validate_chunk handler method in TusPatchMixin
Implemented validate_success_headers handler method in TusCreateMixin
1.10 (2017-03-09)
Disabled chunk writing to disk
1.9 (2017-03-09)
Introduced TusUploadStreamParser
1.8 (2017-03-09)
Introduced setting to include serializer data in respons body
1.7 (2017-03-09)
Bugfixes
1.6 (2017-03-09)
Bugfixes
1.5 (2017-03-09)
Updated middleware, removed required header (bug!)
1.4 (2017-03-09)
Initial migration
1.3 (2017-03-09)
Renamed some parameters / classes
1.2 (2017-03-09)
Cleanup repository.
1.1 (2017-03-09)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for drf_tus-1.14-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 824ff0af7e44fa7618fef7e5531b6384702e3221ad8dafdc5c2e7ec3829c0951 |
|
MD5 | 15be0f4b6d3ab852b95f5e795be3106d |
|
BLAKE2b-256 | c1179eb2605b8b069cb571f3b62f3eb8e15c0c2ebf7582f3104ab0f500514de0 |