djwebdapp


Namedjwebdapp JSON
Version 0.6.1 PyPI version JSON
download
home_pagehttps://yourlabs.io/oss/djwebdapp
Summary
upload_time2023-12-21 18:01:27
maintainer
docs_urlNone
authorJames Pic
requires_python>=3.8
licenseMIT
keywords cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            djWebdApp
~~~~~~~~~

`**Documentation**
<https://djwebdapp.rtfd.io>`_

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 <https://djangopackages.org/>`_.

Video demos
===========

- `Tezos tutorial demo
  <https://www.youtube.com/watch?v=quSX-gJ6eow>`_
- `Ethereum tutorial demo
  <https://www.youtube.com/watch?v=oTjvnjB_8Tc>`_

Getting started
===============

Django basics
-------------

If you are not familiar with the Django development framework, it is
recommended you follow `their tutorial first
<https://docs.djangoproject.com/en/4.0/intro/tutorial01/>`_, 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:

.. code-block:: bash

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

.. _Local blockchains:

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 <https://docs.gitlab.com/ee/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
<https://djwebdapp.rtfd.io>`_ or in the ``docs/`` directory.

            

Raw data

            {
    "_id": null,
    "home_page": "https://yourlabs.io/oss/djwebdapp",
    "name": "djwebdapp",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "cli",
    "author": "James Pic",
    "author_email": "jamespic@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b2/6c/52c5a8a0c222416fe923c79eb949dd5f11f1cca48c47f8e1a36202a58e0a/djwebdapp-0.6.1.tar.gz",
    "platform": null,
    "description": "djWebdApp\n~~~~~~~~~\n\n`**Documentation**\n<https://djwebdapp.rtfd.io>`_\n\nDjango is a great web application framework \"for perfectionists with deadlines\".\n\nA dApp is an app running on the blockchain: a smart contract on which users can\ncall functions on.\n\nThis module provides blockchain support for Django, for reading and/or writing\nthe blockchain, with the following features usable independently:\n\n* blockchain indexer\n* private key vault\n* blockchain writer\n* blockchain data normalization\n* multiple blockchain support (tezos & ethereum so far)\n* inter-blockchain contract synchronisation\n* metamask authentication backend (TBA)\n\nIn addition to these features, djWebdApp differenciates itself from indexers\nlike dipdup because it is extensible: it's just a module you add to your Django\nproject like any other Django App, in which you can add models, endpoints, and\nhave an admin interface for free, and so on, benefiting from the `vast Django\necosystem of apps <https://djangopackages.org/>`_.\n\nVideo demos\n===========\n\n- `Tezos tutorial demo\n  <https://www.youtube.com/watch?v=quSX-gJ6eow>`_\n- `Ethereum tutorial demo\n  <https://www.youtube.com/watch?v=oTjvnjB_8Tc>`_\n\nGetting started\n===============\n\nDjango basics\n-------------\n\nIf you are not familiar with the Django development framework, it is\nrecommended you follow `their tutorial first\n<https://docs.djangoproject.com/en/4.0/intro/tutorial01/>`_, even though you\ncan go through this tutorial copy/pasting your way.\n\nYou may use the demo project or create your own and install djwebdapp there.\n\nInstall\n-------\n\nTo install djwebdapp with all optional dependencies::\n\n    pip install djwebdapp[all][binary]\n\nDon't use ``[binary]`` right there if you prefer to install compiled python\npackages from your system package manager.\n\nSee setup.py's extra_requires for other possibilities.\n\nDemo project\n------------\n\nFor this tutorial, we'll use the ``djwebdapp_demo`` project:\n\n.. code-block:: bash\n\n    git clone https://yourlabs.io/oss/djwebdapp.git\n    cd djwebdapp\n    pip install --editable .[all][binary]\n    ./manage.py migrate\n    ./manage.py shell\n\n.. _Local blockchains:\n\nLocal blockchains\n-----------------\n\nInstead of using mainnets for development, we're going to use a local\nblockchains, so that we can work completely locally.\n\nWe provide a ``docker-compose.yml`` in the root directory of this repository,\nrun ``docker-compose up`` to start it.\n\nAs some of us will also want to convert this to `GitLab-CI\nservices <https://docs.gitlab.com/ee/ci/services/>`_\\ , we'll refer to our services\nby hostname from now on, which is why we add the following to\n``/etc/hosts``::\n\n   127.0.0.1 tzlocal tzkt-api ethlocal\n\nYou should then have:\n\n- a local ethereum HTTP RPC API on ``ethlocal:8545`` with a WebSocket on\n  ``ethlocal:30303``,\n- a local tezos sandbox on ``tzlocal:8732`` which autobakes every second,\n  useable like geth development mode.\n- a local tezos indexer to use the contract history download() function.\n\nSee documentation for **Example contract deployment** in each blockchain\nspecific documentation pages for more pointers.\n\nCustom project\n--------------\n\nInstead of the demo project, you can also create your own project, instead of\nthe first step of cloning do:\n\n* run ``django-admin startproject your_project_name``\n* in ``your_project_name/your_project_name/settings.py``, add to\n  ``INSTALLED_APPS``: ``'djwebdapp', 'djwebdapp_tezos',\n  'djwebdapp_ethereum'``... See ``djwebdapp_demo/settings.py`` for other\n  INSTALLED_APPS you can use\n* proceed with the next steps ``migrate`, ``createsuperuser``, ``runserver``\n  ...\n\nTutorial\n--------\n\nRead documentation `online\n<https://djwebdapp.rtfd.io>`_ or in the ``docs/`` directory.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "",
    "version": "0.6.1",
    "project_urls": {
        "Homepage": "https://yourlabs.io/oss/djwebdapp"
    },
    "split_keywords": [
        "cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b26c52c5a8a0c222416fe923c79eb949dd5f11f1cca48c47f8e1a36202a58e0a",
                "md5": "66a6bed3cba5e33a170c4ceca89e6efd",
                "sha256": "6e7bddfba55786a3c591eb3e2f47b78836da1b332f28d6e4e81d0a1c87f6bf1b"
            },
            "downloads": -1,
            "filename": "djwebdapp-0.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "66a6bed3cba5e33a170c4ceca89e6efd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 59884,
            "upload_time": "2023-12-21T18:01:27",
            "upload_time_iso_8601": "2023-12-21T18:01:27.897108Z",
            "url": "https://files.pythonhosted.org/packages/b2/6c/52c5a8a0c222416fe923c79eb949dd5f11f1cca48c47f8e1a36202a58e0a/djwebdapp-0.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-21 18:01:27",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "djwebdapp"
}
        
Elapsed time: 0.37526s