Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wagner-de-carvalho/acme-flask-auth
API de autenticação com banco de dados
https://github.com/wagner-de-carvalho/acme-flask-auth
flask flask-api flask-login flask-sqlalchemy json python3 rest-api sql sqlite werkzeug
Last synced: about 1 month ago
JSON representation
API de autenticação com banco de dados
- Host: GitHub
- URL: https://github.com/wagner-de-carvalho/acme-flask-auth
- Owner: wagner-de-carvalho
- Created: 2024-01-26T17:08:31.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-02-25T03:33:11.000Z (11 months ago)
- Last Synced: 2024-02-25T04:25:29.680Z (11 months ago)
- Topics: flask, flask-api, flask-login, flask-sqlalchemy, json, python3, rest-api, sql, sqlite, werkzeug
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# acme-flask-auth
API de autenticação com banco de dados### Criar banco de dados via flask shell com Flask Alchemy
1 - `flask shell` = abre o shell do flask
2 - `db.create_all()` = cria o banco de dados
3 - `db.session` = objeto de sessão do banco de dados
4 - `db.session.commit()` = executa as operações no banco de dados### Criar objeto com SQLAlchemy
1 - `user = User(username="admin", password="123")`
2 - `db.session.add(user)`
3 - `db.session.commit()`