https://github.com/sinisaos/starlette-starter
Starlette starter application with Tortoise ORM
https://github.com/sinisaos/starlette-starter
python starlette tortoise-orm
Last synced: 7 months ago
JSON representation
Starlette starter application with Tortoise ORM
- Host: GitHub
- URL: https://github.com/sinisaos/starlette-starter
- Owner: sinisaos
- License: mit
- Created: 2019-09-28T05:19:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-18T05:57:45.000Z (about 3 years ago)
- Last Synced: 2024-04-28T03:18:20.106Z (about 2 years ago)
- Topics: python, starlette, tortoise-orm
- Language: Python
- Homepage:
- Size: 268 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Example of [Starlette](https://www.starlette.io/) and [Tortoise ORM](https://tortoise-orm.readthedocs.io/en/latest/) starter aplication with users managment and auth (thanks to [@ceyzaguirre4](https://github.com/ceyzaguirre4))
Open terminal and run:
```shell
virtualenv -p python3 envname
cd envname
source bin/activate
git clone https://github.com/sinisaos/starlette-starter.git
cd starlette-starter
pip install -r requirements.txt
sudo -i -u yourpostgresusername psql
CREATE DATABASE starter;
\q
touch .env
## put this two line in .env file
## DB_URI="postgres://username:password@localhost:5432/starter"
## SECRET_KEY="your secret key"
uvicorn app:app --port 8000 --host 0.0.0.0
```
Change line 22 in accounts models.py to set register user as admin user.