Skip to main content

Django Spring

Installing

pip install django-spring --upgrade

Usage

# First start the server:
spring start

# Then run a manage.py command (eg. test)
spring test --keepdb

# Optionally, specify a settings module:
DJANGO_SETTINGS_MODULE="base.settings" spring test --keepdb

Comparison

For a large project I tested against, it reduced the test time from 27.8s to 14.5s! Most of the time savings are from app startup, so the largest difference will be felt for running small test suites for large projects.

manage.py

# time ./manage.py test --keepdb billing_service/tests/test_user.py
..........
----------------------------------------------------------------------
Ran 10 tests in 5.090s

OK
Preserving test database for alias 'default'...

real    0m27.773s
user    0m9.490s
sys     0m2.510s

spring

# time spring test --keepdb billing_service/tests/test_user.py
[APP] running command `test --keepdb billing_service/tests/test_user.py`
..........
----------------------------------------------------------------------
Ran 10 tests in 4.714s

OK
Preserving test database for alias 'default'...

real    0m14.457s
user    0m0.180s
sys     0m0.100s

Tweakable env vars

DJANGO_SETTINGS_MODULE: The path to your settings module (eg. base.settings)

CODE_RELOADER_POLL_PERIOD: The number of seconds to wait between polling. Setting this higher will improve performance when using the stat reloader.

LOG_LEVEL: (DEBUG, INFO, WARN, ERROR, CRITICAL)

Release files for django-spring 0.3.0

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-spring 0.3.0
File Size Uploaded
django-spring-0.3.0.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-spring 0.3.0
File Interpreter ABI Platform
django_spring-0.3.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size:23.6 kB

Release files / django-spring-0.3.0.tar.gz

Download URL django-spring-0.3.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
510209e8eff609cc14e5255d8fa752da3cbf4c37d7c7b33b2f3c57cb013b9dfc
BLAKE2b-256 checksum
How to use checksums
ab382e22c810f0005ed11175a54ca6dd452ace0825ce1762b29e1858082a982d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.7

Release files / django_spring-0.3.0-py2.py3-none-any.whl

Download URL django_spring-0.3.0-py2.py3-none-any.whl
Size 13.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
482043997333b37d555e733fd2bc36a84a989ecaf2b1de289e3c6420c9ee25dc
BLAKE2b-256 checksum
How to use checksums
86355d3c610392fcb89e1a723cbb04e30c042519ba2ee68a5c0e285bdc37ad9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

1 release file

0.1.0

2 release files

0.0.5

1 release file

0.0.4

2 release files

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