https://github.com/sinisaos/starlette-tortoise
Q&A application made with Starlette, Tortoise ORM and PostgreSQL
https://github.com/sinisaos/starlette-tortoise
python starlette tortoise-orm
Last synced: 10 months ago
JSON representation
Q&A application made with Starlette, Tortoise ORM and PostgreSQL
- Host: GitHub
- URL: https://github.com/sinisaos/starlette-tortoise
- Owner: sinisaos
- License: mit
- Created: 2019-10-07T05:01:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-10T08:20:20.000Z (about 3 years ago)
- Last Synced: 2025-04-08T21:06:34.420Z (about 1 year ago)
- Topics: python, starlette, tortoise-orm
- Language: Python
- Homepage:
- Size: 297 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Example of [Starlette](https://www.starlette.io/) Q&A application made with [Tortoise ORM](https://tortoise-orm.readthedocs.io/en/latest/) and PostgreSQL.
Open terminal and run:
```shell
virtualenv -p python3 envname
cd envname
source bin/activate
git clone https://github.com/sinisaos/starlette-tortoise.git
cd starlette-tortoise
pip install -r requirements.txt
sudo -i -u yourpostgresusername psql
CREATE DATABASE questions;
\q
touch .env
## put this two line in .env file
## DB_URI="postgres://username:password@localhost:5432/questions"
## SECRET_KEY="your secret key"
uvicorn app:app --port 8000 --host 0.0.0.0
```
For Heroku deployment change DB_URI in .env file and BASE_HOST in settings.py and everything shoud be fine.