Giter VIP home page Giter VIP logo

flask-foodie-api's Introduction

Foodie API - a food app project

This project is a case study for Flask, Poetry, SQLAlchemy usage and Python skills refinement. Some tips and hints are very very welcomed.

Installing

To install the project it is needed Poetry to be downloaded. We use it to manager the project's dependencies and their versions.

As we have Poetry installed, we can downloaded the dependencies with the commands.

  poetry install

How to debug in VS Code?

Firstly, create a folder as .vscode, and then create a file launch.json, so insert the code block below:

{ 
    "version": "0.2.0", 
    "configurations": [ 
        {
            "name": "Poetry: Debug",
            "type": "python",
            "request": "launch",
            "cwd": "${workspaceFolder}",
            "module": "src.Web.main",
            "args": []
        }
    ] ,
    "settings": {
        "python.terminal.activateEnvironment": true
      }
}

Common Errors

  • When you tried to install the dependencies, the venv folder did not appear in the root? Or you can't select the right interpreter in VSCode?

Try execute the following command:

  poetry config virtualenvs.in-project true

This will be creating the .venv folder and VSCode will recognize it automatically.

If you tried something before and Poetry created the folder by default, try this:

  poetry env list
  poetry env remove <venv-folder-name>
  poetry install # will create a new environment using your updated configuration

flask-foodie-api's People

Watchers

Miguel Pombo 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.