Skip to content

CoAP-Server using python Constrained Application Protocol (CoAP), to connect users to db.

License

Notifications You must be signed in to change notification settings

gbhgit/CoAP-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoAP-Server

CoAP-Server using python Constrained Application Protocol (CoAP), to connect users to db.

Requirements

  • Ubuntu 16.04 or 20.04:
  • Python 3
  • Install Mysql

Installation

  • 1: Using the terminal enter in repository folder and type the command:

      `./install_env.sh`
    
  • 2: To create db just run the following commands:

CREATE DATABASE COAP;
CREATE TABLE COAP.Users (
    id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    email VARCHAR(50),
    pass VARCHAR(8) NOT NULL,
    token VARCHAR(24)
);
CREATE TABLE COAP.Hist (
    id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    user_id INT(6) UNSIGNED,
    data_value FLOAT,
    date_value DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
CREATE TABLE COAP.Images (
    id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    user_id INT(6) UNSIGNED,
    data_block LONGTEXT
);

Usage

  • Activate env: . .env/bin/activate

  • Run code: python server.py

About

CoAP-Server using python Constrained Application Protocol (CoAP), to connect users to db.

Topics

Resources

License

Stars

Watchers

Forks

Packages