drf-tus


Namedrf-tus JSON
Version 2.0.1 PyPI version JSON
download
home_pagehttps://github.com/dirkmoors/drf-tus
SummaryA Tus (tus.io) library for Django Rest Framework
upload_time2023-10-13 09:33:26
maintainer
docs_urlNone
authorDirk Moors
requires_python
licenseMIT
keywords drf-tus tus django rest framework django-rest-framework
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =============================
drf-tus
=============================

.. image:: https://badge.fury.io/py/drf-tus.svg
    :target: https://badge.fury.io/py/drf-tus

.. image:: https://github.com/OWNER/REPOSITORY/actions/workflows/ci.yml/badge.svg
    :target: https://github.com/dirkmoors/drf-tus/actions

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`:

.. code-block:: python

    INSTALLED_APPS = (
        ...
        "rest_framework_tus",
        ...
    )

Add the middleware to `MIDDLEWARE`:

.. code-block:: python

    MIDDLEWARE = (
        ...
        "rest_framework_tus.middleware.TusMiddleware",
        ...
    )

Add URL patterns for drf-tus:

.. code-block:: python

    urlpatterns = [
        ...
        path(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:

*  Cookiecutter_
*  `cookiecutter-djangopackage`_

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage




History
-------

2.0.1 (2023-10-13)
++++++++++++++++++

* Repair CI and tests.

2.0.0 (2023-07-06)
++++++++++++++++++

* Django 4.2 LTS compatibility.

1.21.2 (2018-09-04)
+++++++++++++++++++

* Fixed Django compatibility.

1.21.1 (2018-08-01)
+++++++++++++++++++

* Fixed failing travis build.

1.21 (2018-08-01)
+++++++++++++++++

* Updated Django dependency and dropped support for Python 3.3.x (https://github.com/dirkmoors/drf-tus/pull/9).

1.20 (2018-02-12)
+++++++++++++++++

* Implemented per-view max file size setting (https://github.com/dirkmoors/drf-tus/pull/8).

1.19 (2018-02-08)
+++++++++++++++++

* Fixed bug that occurred when pausing uploads (https://github.com/dirkmoors/drf-tus/pull/7).

1.18 (2018-02-08)
+++++++++++++++++

* Make the metadata 'filename' key a setting. (https://github.com/dirkmoors/drf-tus/pull/2).
* Switch from (Positive)IntegerField to BigIntegerField for the upload_length and upload_offset fields (https://github.com/dirkmoors/drf-tus/pull/3).
* Increase Django version support up to 1.11 (https://github.com/dirkmoors/drf-tus/pull/4).
* Fix unicode errors (https://github.com/dirkmoors/drf-tus/pull/5).
* Updated travis configuration.

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 response 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dirkmoors/drf-tus",
    "name": "drf-tus",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "drf-tus,tus,django,rest,framework,django-rest-framework",
    "author": "Dirk Moors",
    "author_email": "dirkmoors@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/11/1d/90a57dfc1916269ef9fa32c62a53417f581962c224df3d7583b09ef1c2fc/drf-tus-2.0.1.tar.gz",
    "platform": null,
    "description": "=============================\ndrf-tus\n=============================\n\n.. image:: https://badge.fury.io/py/drf-tus.svg\n    :target: https://badge.fury.io/py/drf-tus\n\n.. image:: https://github.com/OWNER/REPOSITORY/actions/workflows/ci.yml/badge.svg\n    :target: https://github.com/dirkmoors/drf-tus/actions\n\nA Tus (tus.io) library for Django Rest Framework\n\nDocumentation\n-------------\n\nThe full documentation is at https://drf-tus.readthedocs.io.\n\nQuickstart\n----------\n\nInstall drf-tus::\n\n    pip install drf-tus\n\nAdd it to your `INSTALLED_APPS`:\n\n.. code-block:: python\n\n    INSTALLED_APPS = (\n        ...\n        \"rest_framework_tus\",\n        ...\n    )\n\nAdd the middleware to `MIDDLEWARE`:\n\n.. code-block:: python\n\n    MIDDLEWARE = (\n        ...\n        \"rest_framework_tus.middleware.TusMiddleware\",\n        ...\n    )\n\nAdd URL patterns for drf-tus:\n\n.. code-block:: python\n\n    urlpatterns = [\n        ...\n        path(r\"^\", include(\"rest_framework_tus.urls\", namespace=\"rest_framework_tus\")),\n        ...\n    ]\n\nFeatures\n--------\n\nThis library implements the following TUS API v1.0.0 protocols:\n\n* Core Protocol (http://tus.io/protocols/resumable-upload.html#core-protocol)\n* Creation Protocol (http://tus.io/protocols/resumable-upload.html#creation)\n* Expiration Protocol (http://tus.io/protocols/resumable-upload.html#expiration)\n* Checksum Protocol (http://tus.io/protocols/resumable-upload.html#checksum)\n* Termination Protocol (http://tus.io/protocols/resumable-upload.html#termination)\n\nRunning Tests\n-------------\n\nDoes the code actually work?\n\n::\n\n    source <YOURVIRTUALENV>/bin/activate\n    (myenv) $ pip install tox\n    (myenv) $ tox\n\nCredits\n-------\n\nTools used in rendering this package:\n\n*  Cookiecutter_\n*  `cookiecutter-djangopackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n\n\n\n\nHistory\n-------\n\n2.0.1 (2023-10-13)\n++++++++++++++++++\n\n* Repair CI and tests.\n\n2.0.0 (2023-07-06)\n++++++++++++++++++\n\n* Django 4.2 LTS compatibility.\n\n1.21.2 (2018-09-04)\n+++++++++++++++++++\n\n* Fixed Django compatibility.\n\n1.21.1 (2018-08-01)\n+++++++++++++++++++\n\n* Fixed failing travis build.\n\n1.21 (2018-08-01)\n+++++++++++++++++\n\n* Updated Django dependency and dropped support for Python 3.3.x (https://github.com/dirkmoors/drf-tus/pull/9).\n\n1.20 (2018-02-12)\n+++++++++++++++++\n\n* Implemented per-view max file size setting (https://github.com/dirkmoors/drf-tus/pull/8).\n\n1.19 (2018-02-08)\n+++++++++++++++++\n\n* Fixed bug that occurred when pausing uploads (https://github.com/dirkmoors/drf-tus/pull/7).\n\n1.18 (2018-02-08)\n+++++++++++++++++\n\n* Make the metadata 'filename' key a setting. (https://github.com/dirkmoors/drf-tus/pull/2).\n* Switch from (Positive)IntegerField to BigIntegerField for the upload_length and upload_offset fields (https://github.com/dirkmoors/drf-tus/pull/3).\n* Increase Django version support up to 1.11 (https://github.com/dirkmoors/drf-tus/pull/4).\n* Fix unicode errors (https://github.com/dirkmoors/drf-tus/pull/5).\n* Updated travis configuration.\n\n1.17 (2017-05-10)\n+++++++++++++++++\n\n* Exchanged use of `base64.encodebytes` to `base64.b64encode`.\n\n1.16 (2017-05-04)\n+++++++++++++++++\n\n* Implemented `validate_filename` handler in `TusCreateMixin`.\n\n1.15 (2017-04-06)\n+++++++++++++++++\n\n* Added missing migration and changed max_length to 255 for model `Upload`'s attribute `uploaded_file`.\n\n1.14 (2017-03-30)\n+++++++++++++++++\n\n* Updated default behaviour of the `get_header` handler in `TusMiddleware`.\n\n1.13 (2017-03-30)\n+++++++++++++++++\n\n* Implemented handler for retrieving request headers in `TusMiddleware`.\n\n1.12 (2017-03-10)\n+++++++++++++++++\n\n* Updated `validate_chunk` signature.\n\n1.11 (2017-03-10)\n+++++++++++++++++\n\n* Implemented `validate_chunk` handler method in TusPatchMixin.\n* Implemented `validate_success_headers` handler method in TusCreateMixin.\n\n1.10 (2017-03-09)\n+++++++++++++++++\n\n* Disabled chunk writing to disk.\n\n1.9 (2017-03-09)\n++++++++++++++++\n\n* Introduced TusUploadStreamParser.\n\n1.8 (2017-03-09)\n++++++++++++++++\n\n* Introduced setting to include serializer data in response body.\n\n1.7 (2017-03-09)\n++++++++++++++++\n\n* Bugfixes.\n\n1.6 (2017-03-09)\n++++++++++++++++\n\n* Bugfixes.\n\n1.5 (2017-03-09)\n++++++++++++++++\n\n* Updated middleware, removed required header (bug!).\n\n1.4 (2017-03-09)\n++++++++++++++++\n\n* Initial migration.\n\n1.3 (2017-03-09)\n++++++++++++++++\n\n* Renamed some parameters / classes.\n\n1.2 (2017-03-09)\n++++++++++++++++\n\n* Cleanup repository.\n\n\n1.1 (2017-03-09)\n++++++++++++++++\n\n* First release on PyPI.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Tus (tus.io) library for Django Rest Framework",
    "version": "2.0.1",
    "project_urls": {
        "Homepage": "https://github.com/dirkmoors/drf-tus"
    },
    "split_keywords": [
        "drf-tus",
        "tus",
        "django",
        "rest",
        "framework",
        "django-rest-framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "111d90a57dfc1916269ef9fa32c62a53417f581962c224df3d7583b09ef1c2fc",
                "md5": "c76f53ffaedcd77984627921b0ad047c",
                "sha256": "54309446d7a95e7865a27cee259b51f44c01887fb2dc262f71093b31a412debe"
            },
            "downloads": -1,
            "filename": "drf-tus-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c76f53ffaedcd77984627921b0ad047c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17817,
            "upload_time": "2023-10-13T09:33:26",
            "upload_time_iso_8601": "2023-10-13T09:33:26.862301Z",
            "url": "https://files.pythonhosted.org/packages/11/1d/90a57dfc1916269ef9fa32c62a53417f581962c224df3d7583b09ef1c2fc/drf-tus-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-13 09:33:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dirkmoors",
    "github_project": "drf-tus",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "drf-tus"
}
        
Elapsed time: 0.13738s