Coder Social home page Coder Social logo

flask_project_demo's Introduction

flask_project_demo

A demo flask project for teaching purposes

Requisiti

Per usare l'immagine con docker è necessario installare docker. Altrimenti si può installare localmente l'applicazione tramite poetry

  • docker
  • python 3.10 o superiore
  • poetry

Utilizzo tramite docker (consigliato)

Se si deve solamente utilizzare il server, senza svilupparlo è possibile eseguirlo tramite docker con il comando:

docker compose up

Installazione

L'installazione viene gestita da poetry, si possono installare tutte le dipendenze e il server con il comando:

poetry install

Eseguendo questo comando poetry creerà un virtual environment in automatico con tutte le dipendenze dichiarate nel file pyproject.toml.

Utilizzo

Per avviare l'applicazione si può usare lo script runner.py eseguendo il comando:

poetry shell
python scripts/runner.py

Oppure è possibile, sempre tramite la shell di poetry, eseguire il comando:

server-cli -e .env -A flask_project_demo:create_app run

Il file .env è il file contenente le variabili d'ambiente, cambiare il nome a seconda del proprio caso (nel caso di problemi l'opzione -e si può omettere). Se si vuole eseguire il server in modalità debug è necessario aggiungere la flag --debug.

flask_project_demo's People

Contributors

matteospanio avatar

Watchers

 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.