Skip to main content

django-latency

django-latency is a django application that only contains middleware to simulate network latency on your local machine. It causes your views to take several seconds to return.

This helps you identify client-side code that relies on low-latency server side code, which is generally an anti-pattern.

Like a runner training with weighted shoes, django-latency lets you feel the pain of client-server dependencies.

Set Up

Setting up django-latency is easy. After it is installed in your environemnt and on your path, simply add the middleware class to your MIDDLEWARE_CLASSES list:

MIDDLEWARE_CLASSES = (
    ...
    'latency.middleware.LatencyMiddleware',
    ...
)

django-latency optionally accepts a settings variable called LATENCY_MIDDLEWARE. Currently, LATENCY_MIDDLEWARE is a dictionary whose only key is “WAIT_TIME,” a floating point value.

For example:

LATENCY_MIDDLEWARE = {
    'WAIT_TIME': 5.0
}

Metadata

Release files for django-latency 0.0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-latency 0.0.1.1
File Size Uploaded Provenance Actions
django-latency-0.0.1.1.tar.gz 1.8 kB Without provenance Details for django-latency-0.0.1.1.tar.gz

Release files / django-latency-0.0.1.1.tar.gz

Download URL django-latency-0.0.1.1.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
78393ce41150fa6f863a7c981922e2b959e2b83b3dba60fc3586cfad14194e0a
BLAKE2b-256 checksum
How to use checksums
c2e332372b9d999d90f27ba817e1016af909df85610363bf49d50e6adcfc9711
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-latency 0.0.1.1

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.

Release history Release notifications | RSS feed

This release

0.0.1.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page