Skip to main content

Django REST framework views using the pipeline pattern.

Project description

Django REST Framework Pipeline Views

Coverage Status GitHub Workflow Status PyPI GitHub GitHub last commit GitHub issues

PyPI - Python Version PyPI - Django Version Custom - Django REST Framework Version

pip install drf-pipeline-views

Documentation: https://mrthearman.github.io/drf-pipeline-views/

Source Code: https://github.com/MrThearMan/drf-pipeline-views


Inspired by a talk on The Clean Architecture in Python by Brandon Rhodes, drf-pipeline-views aims to simplify writing testable API endpoints with Django REST framework using the Pipeline Design Pattern.

The main idea behind the pipeline pattern is to process data in steps. Input from the previous step is passed to the next, resulting in a collection of "data-in, data-out" -functions. These functions can be easily unit tested, since none of the functions depend on the state of the objects in the other parts of the pipeline. Furthermore, IO can be separated into its own step, making the other parts of the logic simpler and faster to test by not having to mock or do any other special setup around the IO. This also means that the IO block, or in fact any other part of the application, can be replaced as long as the data flowing through the pipeline remains the same.

Have a look at the quickstart section in the documentation on basic usage.

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-pipeline-views-0.2.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

drf_pipeline_views-0.2.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file drf-pipeline-views-0.2.0.tar.gz.

File metadata

  • Download URL: drf-pipeline-views-0.2.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.9 CPython/3.9.2 Windows/10

File hashes

Hashes for drf-pipeline-views-0.2.0.tar.gz
Algorithm Hash digest
SHA256 21955aa77b3801d4ab1f251285f557826c9207b5a4636d30ab56c12c3d32275a
MD5 118ed71b1fb37f652e4dc83aa5368072
BLAKE2b-256 2d1b1c47fa5732d03fd3412ddfed7a7b314f1c3cb80b5c6acf275648d8f62de7

See more details on using hashes here.

File details

Details for the file drf_pipeline_views-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for drf_pipeline_views-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f351e2147eaaf74f918f1c016c96b92e38100a99fd58166639f679b58e1587b4
MD5 816c3b03b43c03f3c6944c6b12a43e94
BLAKE2b-256 fae5cba74871eee0b282c19d43fe6b28539814bb964db03b13fb51ed89b10f5a

See more details on using hashes here.

Supported by

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