Giter Club home page Giter Club logo

sala-de-estudos-flask's Introduction

Sala de Estudos Flask API

This is a backend API for saladeestudos_COMP_UFF.

It provides infos about professors, subjects, lessons and more for students of Tecnologia em Sistemas de Computação course of Universidade Federal Fluminense.

Installation

Development mode

Requirements

This Flask application requires a PostrgreSQL database running. You can set the parameters to access the database in .secrets.toml and use .secrets.toml.example as example.


For development mode it's recommended to use a virtual environment. Try to follow this tutorial on realpython.com/intro-to-pyenv/ .

Install poetry to manage dependencies:

$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python

You can use poetry to manage virtual environments too.

Since you have a virtual environment installed, you can install this application for development using a single command:

$ make install-dev

Update the database.

$ flask db upgrade

Now you can run this application in development mode.

$ make run-dev

Usage

Subjects

  • /api/v1/subjects/

    Returns a list of all subjects on the database

    [  
      {
        "code": "ead05006", 
        "id": 1, 
        "material_design_icon": null, 
        "name": "Álgebra Lienar"
      }, 
      {
        "code": "ead05018", 
        "id": 2, 
        "material_design_icon": null, 
        "name": "Análise de Sistemas"
      },
      ...
    ]
  • /api/v1/subject/<id>/

    Returns data referent for a subjects

    {
      "amount_lessons": 15, 
      "code": "ead05006", 
      "drive_link": null, 
      "github_link": null, 
      "id": 1, 
      "name": "Álgebra Lienar", 
      "type": "OBRIGATÓRIA", 
      "workload": 80
    }
  • /api/v1/subject/<subject_id>/lessons

    Returns a list of lessons

    [
      {
        "id": 1, 
        "lesson_index": "Aula 001", 
        "thumbnail": "http://va05-idc.rnp.br/riotransfer/cederj/sistemas_comp/ead05006/Aula_001/Aula_001_t.png", 
        "title": "Vetores"
      }, 
      {
        "id": 2, 
        "lesson_index": "Aula 002", 
        "thumbnail": "http://va05-idc.rnp.br/riotransfer/cederj/sistemas_comp/ead05006/Aula_002/02.png", 
        "title": "Espaços vetoriais"
      },
      ...
    ]

sala-de-estudos-flask's People

Contributors

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