question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for than app.py

See original GitHub issue

The initial version of this framework only has support for an app.py file. I always envisioned being able to support more than this, while still trying to keep things small. What I had in mind:

  • You can either have a single app.py or, create an app/ directory.
  • The app/ directory must be a python package (__init__.py).
  • You still have to have an app object defined in __init__.py.
  • Everything in app/ will be included in the zip file distribution, including non python files.

This will allow you to split your app into multiple python modules as well as include data/config files with your app.

Keep in mind, the source code analyzer will likely need to be updated as well to handle more than just an app.py file.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:39
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

18reactions
dkotikcommented, Jul 20, 2016

Please, please make this work!

8reactions
booshcommented, Aug 10, 2017

@jamesls Any progress on allowing routes to be in more than just app.py? It’d be super useful for larger projects.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to setup environment variables for `flask run` on Windows?
27 Answers 27 · Go to the folder where you have placed your flask app (on the command line) · Create a virtual...
Read more >
How To Use Web Forms in a Flask Application - DigitalOcean
First, open your app.py file: nano app.py. Copy. Add the following route to the end ...
Read more >
Setting up Flask applications on PythonAnywhere
Go to the Web Tab and hit Add a new Web App, and choose Flask and the Python version you want. The second...
Read more >
Python and Flask Tutorial in Visual Studio Code
Python Flask tutorial showing IntelliSense, debugging, and code navigation support in Visual Studio Code, the best Python IDE.
Read more >
Quickstart — Flask Documentation (1.1.x)
Make sure to not call your application flask.py because this would conflict ... If GET is present, Flask automatically adds support for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found