Git Product home page Git Product logo

wallet-backend-django's Introduction

wallet-backend-django

Mini wallet API backend service with Django

Features


  1. Initialize wallet account
  2. Enable & disabled wallet
  3. View Wallet
  4. View Transaction
  5. Deposit & withdrawn money

Requirements


  1. Python 3.8+
  2. Docker

Local Configuration


  1. clone source code from github

  2. go to project directory

    cd wallet-backend-django
  3. create your own project env

    python3 -m venv env
  4. activate your project env

    source env/bin/activate
  5. go to your project directory and install requirement.txt

    pip install requirement.txt
  6. run docker compose

    docker compose up -d
  7. migrate all models to database.

    python3 manage.py migrate
  8. then run the apps.

    python3 manage.py runserver

Run The Test and Coverage


  1. run test case.

    python3 manage.py test

    the output should be like this:

    Found 8 test(s).
    Creating test database for alias 'default'...
    System check identified no issues (0 silenced).
    ........
    ----------------------------------------------------------------------
    Ran 8 tests in 2.507s
    
    OK
    Destroying test database for alias 'default'...
  2. run test coverage.

    coverage run --source='.' manage.py test src.wallet
    coverage report

    the output should be like this:

    Found 8 test(s).
    Creating test database for alias 'default'...
    System check identified no issues (0 silenced).
    ........
    ----------------------------------------------------------------------
    Ran 8 tests in 2.512s
    
    OK
    Destroying test database for alias 'default'...
    
    Name                                    Stmts   Miss  Cover
    -----------------------------------------------------------
    manage.py                                  12      2    83%
    src/__init__.py                             0      0   100%
    src/asgi.py                                 4      4     0%
    src/settings.py                            21      0   100%
    src/urls.py                                 2      0   100%
    src/wallet/__init__.py                      0      0   100%
    src/wallet/admin.py                         1      0   100%
    src/wallet/apps.py                          4      0   100%
    src/wallet/decorators.py                   36      0   100%
    src/wallet/factory.py                      21      0   100%
    src/wallet/migrations/0001_initial.py       8      0   100%
    src/wallet/migrations/__init__.py           0      0   100%
    src/wallet/models.py                       46      6    87%
    src/wallet/serializers.py                  53      0   100%
    src/wallet/tests.py                       128      0   100%
    src/wallet/urls.py                          3      0   100%
    src/wallet/utils.py                         4      0   100%
    src/wallet/views.py                       102      0   100%
    src/wsgi.py                                 4      4     0%
    -----------------------------------------------------------
    TOTAL                                     449     16    96%

Postman


You can try API with postman by import the collection and environment file

wallet-backend-django's People

Contributors

kaajee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.