Git Product home page Git Product logo

sgd-back's Introduction

SGD backend

SGD backend application (Servicios Generales a Domicilio).

Make sure that Python 3.7.x version or above is used to use this software. Use python3.8 may cause dependency installation to be a bit slower than with python3.7 (check this for more information).

Installation

  • Create a virtualenv

    # linux
    # first install virtualenv packages, then
    virtualenv venv
    
    # windows, macos
    python3 -m venv venv
  • Active virtualenv and install dependencies

    # linux, macos
    source venv/bin/activate
    
    # windows
    venv/Scripts/activate.bat
    
    # install dependencies
    # with pip
    pip install -r requirements.txt  # maybe pip3
    
    # with poetry
    poetry install

Project information

This project is made up with 3 main packages: django, grpcio and chatterbot

  • Django is the main package
  • grpcio is used to build a grpc server for stream comunication
  • Chatterbot for make a chat bot (works over gRPC server)

Before debug the applications or update they, is required follow some steps (for gRPC and chatterbot, go inside of sgd_grcp folder)

  • Django:

    Load the initial data

    python manage.py loaddata data/initial.json

    This load permissions and an admin user(admin|admin1234).

  • gRPC:

    When you update sgd.proto file, execute:

    python codegen.py

    This update the code required for grpc server.

  • Chatterbot:

    For training data, create training folder inside of sgd_grpc and add your training data in yml format (see some examples). This files will be loaded for the bot.

    Excute the following command for download some data model needed for chhatterbot (spacy dependency)

    python spacy_download

Debug

  • You need create a .env file for settings configuration. Check the .env.example file for view the current variables. Update the DATABASE CONFIGURATION section with your local database credentials (for django application).

  • For run the django application:

    python manage.py runserver
  • For run the gRPC application, go inside sgd_grcp folder and then:

    python server.py

    Chatbot run over gRPC server.

Developed with

  • Django Rest Framework, a powerful and flexible toolkit for building Web APIs, built on Django
  • gRPC, a python implementation for build a high performance, open source universal RPC framework.
  • Chatterbot, a machine-learning based conversational dialog engine build in Python.

sgd-back's People

Contributors

msslune avatar

Watchers

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