swagger-api / swagger-api/swagger-codegen

How to properly initialize Connexion and SQLAlchemy in Flask generated __main__.py

Open
#7,307 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

General: Question Server: Python
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

So far I have had absolutely no success in getting SQLAlchemy to work properly with your Flask generated code. Can someone tell me what the appropriate __main__.py initialization code would look like for using SQLAlchemy along with Connexion in your generated code? I've also scoured the internet trying to find a project using your generated Flask code with SQLAlchemy and I haven't found anything resembling your project structure.

Swagger-codegen version

2.0

Related issues/PRs

https://github.com/zalando/connexion/issues/557#issuecomment-354974644

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the generated main.py and the related Connexion issue comment linked in the report, then trace how the generated Flask application is initialized. Done means providing a documented, working initialization example for using SQLAlchemy with Connexion in the generated project structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python, sqlalchemy
Domain
api, backend, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.