Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moreonion/supermarket
https://github.com/moreonion/supermarket
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/moreonion/supermarket
- Owner: moreonion
- Created: 2017-05-23T15:00:47.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T04:48:12.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T23:17:05.242Z (9 months ago)
- Language: Python
- Size: 350 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Installation
Install the dependencies:
### Production
```bash
pip install -r requirements.txt
```### Development
```bash
# Virtual env
cd supermarket
python3 -m venv env
source env/bin/activate# Dependencies
sudo apt-get install postgresql libpq-dev
[env] pip install -r requirements/dev.txt# Databases
createdb supermarket
createdb supermarket_test# Fill database with example data
export FLASK_APP=app.py
flask fixture_example_data# Interactive shell in app context
export FLASK_APP=app.py
flask shell
```When using a virtual python environment, it's easiest to add
`export FLASK_APP=app.py` to the `activate` script.Coding style should follow flake8 guidelines as configured in `.flake8` file.
## Run
For development you can use:
```bash
export FLASK_APP=app.py
flask run
```For production you should use some real HTTP server like gunicorn or uWSGI.
## Tests
```bash
py.test
```