Skip to main content

django-rest-bible - A modern Bible Backend for the Django Web Framework

django-rest-bible is a modern, actively maintained Python package & Django app for interfacing with the King James Version of the Holy Bible. This project is an extension of the unmaintained package django-bible, updated and improved for modern Python environments.

Installation

To install, simply run the script with the install command:

pip install django-rest-bible

Quick start

  1. This package depends on rest_framework, django_filters and drf-spectacular packages. Add them and also bible and bible_api to your INSTALLED_APPS setting:
 INSTALLED_APPS = [
        ...,
        "rest_framework",
        "django_filters",
        "drf-spectacular",
        "bible",
        "bible_api",
    ]
  1. Include the bible and bible_api URLconf in your project urls.py:
path('', include('bible.urls')),
path('api/v1/', include('api.urls')),
  1. Run python manage.py migrate to create the models.

  2. Once the tables have been created, you need to populate the tables with Bible data.

Bible Data

A JSON dump of the entire KJV Bible is available for download here.

You can load the downloaded Bible data into your project's database by running the django loaddata command:

python manage.py loaddata kjv_bible.json --app bible
  1. Start the development server python manage.py runserver and visit http://127.0.0.1:8000/ for the Index of books. Click each book of the Bible to see its content.

  2. To read the whole bible GET /bible/, for old testament only GET /bible/ot/ and GET /bible/nt/ for new testament.

  3. A dedicated endpoint is available at GET /api/v1/bible. You can filter for a specific book, chapter or verse using the query parameters chapter__book_slug, chapter__number and number for example: http://127.0.0.1:8000/api/v1/bible/?chapter__book__slug=genesis&chapter__number=2&number=3 should return a serialized Genesis 2:3.

  4. For Swagger UI, use drf-spectacular. To configure this, make sure drf-spectacular is added to installed apps in settings.py. Then register the spectacular AutoSchema with DRF:

REST_FRAMEWORK = {
    # YOUR SETTINGS
    'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
}

and specify some metadata:

SPECTACULAR_SETTINGS = {
    'TITLE': 'Your Project API',
    'DESCRIPTION': 'Your project description',
    'VERSION': '1.0.0',
    'SERVE_INCLUDE_SCHEMA': False,
    # OTHER SETTINGS
}

Finally register the endpoints in your project urls.py

from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView

urlpatterns = [
    # YOUR PATTERNS
    path('api/schema/', SpectacularAPIView.as_view(), name='schema'),
    path('api/schema/swagger-ui/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
    path('api/schema/redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'),
]

Now go to GET /api/schema/swagger-ui/ to access the Swagger UI.

Why This Project Exists

The original project, django-bible, provided a useful foundation but appears to have been unmaintained for many years.

This version was created to:

  • Keep the project alive and usable
  • Add improvements and bug fixes
  • Ensure compatibility with modern Python versions
  • Add RESTful API Service
  • Provide ongoing maintenance and support

What’s Changed

  • Updated dependencies
  • Improved code structure
  • Added new features and fixes
  • Enhanced documentation

License & Attribution

This project is an extension of django-bible, created by David Davis.

The original work is licensed under the BSD 3-Clause License This project retains the original license and copyright Additional modifications are © 2026 Uchenna Adubasim

See the LICENSE file for full details.

Contributing

Contributions are welcome! To contribute,

  • Fork the repo
  • Create a new branch
  • Submit a pull request

Issues

If you find a bug or have a feature request, please open an issue.

Acknowledgements

Special thanks to David Davis for building the foundation of this project.

Maintainer

This project is actively maintained by:

  • Uchenna Adubasim (Lead Maintainer)

For issues, features, and support, please contact or open an issue in this repository.

Contact

To contact the author, please fill out this form

Metadata

Release files for django-rest-bible 0.0.2

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-rest-bible 0.0.2
File Size Uploaded Provenance Actions
django_rest_bible-0.0.2.tar.gz 15.3 kB Without provenance Details for django_rest_bible-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-rest-bible 0.0.2
File Interpreter ABI Platform Actions
django_rest_bible-0.0.2-py3-none-any.whl Python 3 none any Details for django_rest_bible-0.0.2-py3-none-any.whl

Total release size: 31.0 kB

Release files / django_rest_bible-0.0.2.tar.gz

Download URL django_rest_bible-0.0.2.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e925935bc2d79a823c269f792a40399473079073a85926f912d2fd5cc1f91880
BLAKE2b-256 checksum
How to use checksums
8c4de16281a193dfe1b0f704fd95a30029ced4f8c6ce9b760d55bc279c4c794b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / django_rest_bible-0.0.2-py3-none-any.whl

Download URL django_rest_bible-0.0.2-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63d24757808f80f6ace40633d43f977034a36cc9fae54864c71d2c3cd87755b6
BLAKE2b-256 checksum
How to use checksums
d020b9c398e79a88e23828d1a08098b1be4fb4ce846901766e7796c82aaf3e21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for django-rest-bible 0.0.2

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.2 This release

2 release files 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