Replies: 3 comments
-
Thoughts? More intuitive patterns? This would be especially convenient for teams wanting to migrate an existing app to Piccolo without restructuring- fewer barriers to adoption. Would be great to at least see AppRegistry be able to take configuration from any variable before 1.0. |
Beta Was this translation helpful? Give feedback.
-
Note, when you run your web server you also have to use |
Beta Was this translation helpful? Give feedback.
-
The easiest hack would be to put all of your code in What makes things awkward at the moment is if you wanted to rename There could be another way besides environment variables - a |
Beta Was this translation helpful? Give feedback.
-
It's a bit of a hangup to use Piccolo in a multi-app layout, many ASGI servers support having a single
app.py
file you can just point to and serve instantly (Sanic Server, Uvicorn, etc).It would be really great if Piccolo had better support to load config from any variable you choose, and more flexibility about where it can find config (not just loaded from modules)- so you can do migrations as a single app.
A bit of a hack, but I have it working like this:
Using this layout, piccolo can be run like so:
export PICCOLO_CONF=app; piccolo migrations new app --auto
export PICCOLO_CONF=app; piccolo migrations forwards app
Beta Was this translation helpful? Give feedback.
All reactions