Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maldoinc/wireup-demo
Demo application for maldoinc/wireup
https://github.com/maldoinc/wireup-demo
Last synced: 2 months ago
JSON representation
Demo application for maldoinc/wireup
- Host: GitHub
- URL: https://github.com/maldoinc/wireup-demo
- Owner: maldoinc
- License: mit
- Created: 2023-09-06T23:14:31.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-24T14:30:39.000Z (5 months ago)
- Last Synced: 2024-11-02T14:51:38.673Z (2 months ago)
- Language: Python
- Homepage:
- Size: 135 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
## Wireup demo
Demo application for [Wireup](https://maldoinc.github.io/wireup/), a Python dependency injection library.
Demo contains a Flask application and a set of commands using Click.
The web application and commands share the same service layer using Wireup.## Usage
This is intended as a demo to showcase various aspects of wireup. Feel free to explore
and play around with to get familiar with the library.### Points of interest
* `demoapp/app.py` - Flask app initialization.
* `demoapp/cli.py` - Cli for this application via Click.
* `demoapp/service` - Service declaration.
* `demoapp/blueprint` - Autowiring api views.
* `test` - Tests. Various examples on testing the services in isolation.### Running the cli
`python -m demoapp.cli`
* Create initial db with `python -m demoapp.cli create-db`
* Add a blog post `python -m demoapp.cli create-post "Hello World" "This is my first blog"`### Running the api
`FLASK_APP=demoapp/app.py python -m flask run`