Git Product home page Git Product logo

flask-api-starter-kit's People

Contributors

adrienlina avatar ambreelmee avatar antkahn avatar paulmolin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flask-api-starter-kit's Issues

make db/upgrade command Error

I can't run make db/upgrade command because of an Error:
File "src/manage.py", line 3, in <module> from flask_migrate import Migrate, MigrateCommand File "/mnt/vendor/lib/python3.4/site-packages/flask_migrate/__init__.py", line 3, in <module> from flask.ext.script import Manager ImportError: No module named 'flask.ext' make: *** [Makefile:31: db/upgrade] Error 1
OS - Linux Manjaro, python 3.4.
All required packages are installed correctly, what I have to do?

How to connect database?

I have run these command:

  • make install >> install python dependencies
  • make database.connect >> unable to connect to container
  • make database.migrate >> unable to connect to database (see attachment below)

Screen Shot 2020-07-14 at 07 17 22

any thought about this?
thank you

Apply cookiecutter

Why shouldn't we apply cookiecutter to this project for proper templating?

Does not run `no module named` error

I successfully ran make server.install

And then I tried to run make server.start, but I got this error

❯ make server.start
docker-compose up server
Starting backend_dbdata_1 ... done
Starting backend_db_1     ... done
Starting backend_server_1 ... done
Attaching to backend_server_1
server_1      | Traceback (most recent call last):
server_1      |   File "src/server.py", line 1, in <module>
server_1      |     from flasgger import Swagger
server_1      | ModuleNotFoundError: No module named 'flasgger'
backend_server_1 exited with code 1

When I had ran make server.install, this was the last part of the long output

<previous output>
Successfully installed Flask-1.0.3 Flask-Migrate-2.5.2 Flask-RESTful-0.3.7 Flask-SQLAlchemy-2.4.0 Flask-Script-2
.0.6 Jinja2-2.10.1 Mako-1.2.0 MarkupSafe-2.1.1 PyYAML-6.0 SQLAlchemy-1.3.4 Werkzeug-0.15.4 alembic-1.0.10 aniso8
601-9.0.1 appdirs-1.4.4 atomicwrites-1.4.0 attrs-21.4.0 black-19.3b0 certifi-2022.6.15 chardet-3.0.4 click-8.1.3
 colorclass-2.2.2 coverage-6.4.1 docopt-0.6.2 dparse-0.5.1 entrypoints-0.3 flake8-3.7.7 flasgger-0.9.2 idna-2.8
importlib-metadata-4.11.4 importlib-resources-5.8.0 isort-4.3.20 itsdangerous-1.1.0 jsonschema-4.6.0 mccabe-0.6.
1 mistune-2.0.2 more-itertools-8.13.0 packaging-21.3 pip-upgrader-1.4.12 pluggy-0.13.1 psycopg2-2.8.2 py-1.11.0
pycodestyle-2.5.0 pyflakes-2.1.1 pyparsing-3.0.9 pyrsistent-0.18.1 pytest-4.6.2 pytest-cov-2.7.1 pytest-sugar-0.
9.2 python-dateutil-2.8.2 python-editor-1.0.4 pytz-2019.1 requests-2.22.0 safety-1.8.5 setproctitle-1.1.10 six-1
.12.0 termcolor-1.1.0 terminaltables-3.1.10 toml-0.10.2 typing-extensions-4.2.0 urllib3-1.25.11 wcwidth-0.2.5 zi
pp-3.8.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the syst
em package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.

CORS

Hi Ant how can we deal with CORS. I have a React application using Axios but when I do so there is a message saying that CORS is not allowed.

flask_script is not supported any more, I switched to Flask CLI but I can't run make database._migrate

I tried a "make database._migrate" but I got an error because flask_script is not supported any more, I switched to Flask CLI
And my manage.py is as follow.


from flask import Flask
from flask.cli import FlaskGroup
from flask_migrate import Migrate

import config
from models import db

server = Flask(__name__)
server.debug = config.DEBUG
server.config["SQLALCHEMY_DATABASE_URI"] = config.DB_URI
db.init_app(server)

migrate = Migrate()

migrate.init_app(server, db)
#migrate = Migrate(server, db)

cli = FlaskGroup(server)

if __name__ == "__main__":
    cli()

How ever when I run : make database._migrate which is ( docker-compose run --rm server python src/manage.py db migrate )
I get

Error: Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a 'wsgi.py' or 'app.py' file in the current directory. make: *** [database.migrate] Error 2

Could help with that please ?

Getting No such file or directory error

raise child_exception_type(errno_num, err_msg, err_filename)
server_1 | FileNotFoundError: [Errno 2] No such file or directory: '/mnt/src/server.py': '/mnt/src/server.py'

any idea why I am getting this error

Error when running 'make server.install'

When running the above command I get the following error:

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements-dev.txt'

Does the file need to be added to the Docker image before this command can be run?

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.