https://github.com/kevorr/silkroad
Python based database project
https://github.com/kevorr/silkroad
flask postgresql python
Last synced: about 2 months ago
JSON representation
Python based database project
- Host: GitHub
- URL: https://github.com/kevorr/silkroad
- Owner: KevOrr
- Created: 2017-04-11T06:17:00.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-25T16:19:52.000Z (about 9 years ago)
- Last Synced: 2025-02-16T14:27:07.498Z (over 1 year ago)
- Topics: flask, postgresql, python
- Language: Python
- Size: 1.66 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Installation
Optional:
virtualenv -p python3 venv
. venv/bin/activate
Install python requirements using pip:
pip install -r requirements.txt
Note: if you are not using a `virtualenv` and pip complains about permissions,
add the `--user` flag to `pip install`.
Setup `customconfig.py` to override the defaults in `appconfig.py` by creating a
single class named `Config`. Example:
class Config:
SQLALCHEMY_DATABASE_URI = 'postgresql://user:pass@host:port/dbname'
PSYCOPG2_LOGIN_INFO = {
'host': 'localhost',
'port': 5432,
'dbname': 'my_database_name',
'password': 'my_password'
}
## Running
export FLASK_APP=app.py
flask []
#### Commands
* `initdb` Initializes databse with random information from `datagenerator.py`
* `make-admin` Create a single admin user
* `dbusertest` Prints usernames in the database
* `run` Runs the flask web server
* `--debugger`/`--no-debugger` Turn on (or off) the flask debugger. Off by default.
* `shell` Run a python interpreter in the application environment