mnm458 / DSbot-backend

Python server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flask proxy for python file

app - project folder; server.py - main running file

Versions

Requires: Python >=3.5

Install packages

pip install -r requirements.txt  --no-cache-dir

Run

python server.py

Echo test

curl http://localhost:5000/echo/test123

Data request

curl --header "Content-Type: application/json" \
  --request POST \
  --data '{\
	"input" : "Some input text",\
	"token" : ""
	}' http://localhost:5000/api/v1/input

Answer: script output example { "output": "oewiruwr ioeiwr " "token": "fHBQCHs" }

Clear cache

curl http://localhost:5000/clear/fHBQCHs

Example for token fHBQCHs

Answer: 'Cleared'

About

Python server


Languages

Language:Python 100.0%