Helper function that creates a plnt app.
()
| 5 | |
| 6 | |
| 7 | def make_app(): |
| 8 | """Helper function that creates a plnt app.""" |
| 9 | from plnt import Plnt |
| 10 | |
| 11 | database_uri = os.environ.get("PLNT_DATABASE_URI") |
| 12 | app = Plnt(database_uri or "sqlite:////tmp/plnt.db") |
| 13 | app.bind_to_context() |
| 14 | return app |
| 15 | |
| 16 | |
| 17 | @click.group() |