Skip to content

Kraloz/api-flask

Repository files navigation

flask-restapi(WIP)

API reference

  • Listar Sensores:
    • GET /sensores
      • RequestBody : none
      • ResponseBody:
        •   {
            "id": _id,
            "desc" : "descripción del sensor",
            "tipo_sens" : "tipo del sensor,
            "valor" : valor del sensor
             }, ...
          
    • Returns a JSON (Content-type: application/json) with all the sensors info
  • Ver Sensor:
    • GET /sensores/<int:id>
      • RequestBody : none
      • ResponseBody:
        •   {
            "id": _id,
            "desc" : "descripción del sensor",
            "tipo_sens" : "tipo del sensor,
            "valor" : valor del sensor
             }
          
    • Returns a JSON (Content-type: application/json) with the sensor info of a specific sensor
  • Crear Sensor:
    • PUT /sensores/<int:id>
      • RequestBody :
      •      {
             "id": _id,
             "desc" : "descripción del sensor",
             "tipo_sens" : "tipo del sensor,
             "valor" : valor del sensor
              }
        
      • ResponseBody: none
    • Create a new register in the database

Getting Started

  • Clone (or download) a copy of this repository into your machine
  • ???
  • Enjoy

Prerequisites

Installing

cd /api-flask-master
pip install -r requirements.txt

Running

cd /api-flask-master
python ./apy.py

Built With

Authors

  • Tomás Aprile - Initial work - Kraloz

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

A simple attempt of API RESTful in flask

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published