Skip to main content

A Tus (tus.io) library for Django Rest Framework

Project description

https://badge.fury.io/py/drf-tus.svg https://travis-ci.org/dirkmoors/drf-tus.svg?branch=master https://codecov.io/gh/dirkmoors/drf-tus/branch/master/graph/badge.svg

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:

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.21.2 (2018-09-04)

  • Fixed Django compatibility

1.21.1 (2018-08-01)

  • Fixed failing travis build

1.21 (2018-08-01)

1.20 (2018-02-12)

1.19 (2018-02-08)

1.18 (2018-02-08)

1.17 (2017-05-10)

  • Exchanged use of base64.encodebytes to base64.b64encode.

1.16 (2017-05-04)

  • Implemented validate_filename handler in TusCreateMixin.

1.15 (2017-04-06)

  • Added missing migration and changed max_length to 255 for model Upload’s attribute uploaded_file

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drf-tus-1.21.2.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drf_tus-1.21.2-py2.py3-none-any.whl (22.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file drf-tus-1.21.2.tar.gz.

File metadata

  • Download URL: drf-tus-1.21.2.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for drf-tus-1.21.2.tar.gz
Algorithm Hash digest
SHA256 e0c89a1c4892ab942fd55c9ef4f91b2d5dd034532b5273c9520177653e8cf751
MD5 7e082ba25d4eec49c65ddaad637fc022
BLAKE2b-256 01a69c2297844aa5e74ccf9d40889d04c1e6c7d8bbcd4746b431a5545af4b617

See more details on using hashes here.

File details

Details for the file drf_tus-1.21.2-py2.py3-none-any.whl.

File metadata

  • Download URL: drf_tus-1.21.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for drf_tus-1.21.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a312e22af4d1e2a3cbf31ef319ff6de44ac1346e7d015ff491fbaa6e7c363a9a
MD5 2674debd86957617b0c84e9f6f896b44
BLAKE2b-256 78b098e8df4c7c8277864747f81a8644191f19da0f3e531ff48437832261bb8e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page