Skip to main content

djWebdApp

**Documentation**

Django is a great web application framework “for perfectionists with deadlines”.

A dApp is an app running on the blockchain: a smart contract on which users can call functions on.

This module provides blockchain support for Django, for reading and/or writing the blockchain, with the following features usable independently:

  • blockchain indexer

  • private key vault

  • blockchain writer

  • blockchain data normalization

  • multiple blockchain support (tezos & ethereum so far)

  • inter-blockchain contract synchronisation

  • metamask authentication backend (TBA)

In addition to these features, djWebdApp differenciates itself from indexers like dipdup because it is extensible: it’s just a module you add to your Django project like any other Django App, in which you can add models, endpoints, and have an admin interface for free, and so on, benefiting from the vast Django ecosystem of apps.

Video demos

Getting started

Django basics

If you are not familiar with the Django development framework, it is recommended you follow their tutorial first, even though you can go through this tutorial copy/pasting your way.

You may use the demo project or create your own and install djwebdapp there.

Install

To install djwebdapp with all optional dependencies:

pip install djwebdapp[all][binary]

Don’t use [binary] right there if you prefer to install compiled python packages from your system package manager.

See setup.py’s extra_requires for other possibilities.

Demo project

For this tutorial, we’ll use the djwebdapp_demo project:

git clone https://yourlabs.io/oss/djwebdapp.git
cd djwebdapp
pip install --editable .[all][binary]
./manage.py migrate
./manage.py shell

Local blockchains

Instead of using mainnets for development, we’re going to use a local blockchains, so that we can work completely locally.

We provide a docker-compose.yml in the root directory of this repository, run docker-compose up to start it.

As some of us will also want to convert this to GitLab-CI services, we’ll refer to our services by hostname from now on, which is why we add the following to /etc/hosts:

127.0.0.1 tzlocal tzkt-api ethlocal

You should then have:

  • a local ethereum HTTP RPC API on ethlocal:8545 with a WebSocket on ethlocal:30303,

  • a local tezos sandbox on tzlocal:8732 which autobakes every second, useable like geth development mode.

  • a local tezos indexer to use the contract history download() function.

See documentation for Example contract deployment in each blockchain specific documentation pages for more pointers.

Custom project

Instead of the demo project, you can also create your own project, instead of the first step of cloning do:

  • run django-admin startproject your_project_name

  • in your_project_name/your_project_name/settings.py, add to INSTALLED_APPS: 'djwebdapp', 'djwebdapp_tezos', 'djwebdapp_ethereum'… See djwebdapp_demo/settings.py for other INSTALLED_APPS you can use

  • proceed with the next steps migrate`, ``createsuperuser, runserver …

Tutorial

Read documentation online or in the docs/ directory.

Metadata

Release files for djwebdapp 0.6.17

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

Source distribution (sdist)

Source distribution for djwebdapp 0.6.17
File Size Uploaded Provenance Actions
djwebdapp-0.6.17.tar.gz 61.6 kB Without provenance Details for djwebdapp-0.6.17.tar.gz

Release files / djwebdapp-0.6.17.tar.gz

Download URL djwebdapp-0.6.17.tar.gz
Size 61.6 kB
Tags Source
SHA-256 checksum
How to use checksums
765387cf14c1b4e6f09b60a565bb276531050f7de5306af46b58dedb65ff0b24
BLAKE2b-256 checksum
How to use checksums
0ccd54c4ebcf075ab6d9710efade15e1700a4129ceb00e2e4d1271b920fa9ad3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for djwebdapp 0.6.17

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