An open API service indexing awesome lists of open source software.

https://github.com/matheusadc/sample-flask-auth

Repository created to store the authentication API code with the database.
https://github.com/matheusadc/sample-flask-auth

docker-compose flask flask-login flask-sqlalchemy python

Last synced: 5 months ago
JSON representation

Repository created to store the authentication API code with the database.

Awesome Lists containing this project

README

          

# description icon Description
Repository created to store the authentication API code with the database.

# terminal icon Commands

## books icon Installing and updating dependencies
```
pip install -r requirements.txt --upgrade
```

```
pip install bcrypt==4.1.2
```

## database icon Creating a database
### Using Flask commands
```
flask shell
```

### Indicating the creation of the database
```
db.create_all()
```

### Recording the creation of the database
```
db.session.commit()
```

### Exiting the terminal
```
exit()
```

## database icon Deleting a database
### Using Flask commands
```
flask shell
```

### Indicating the removal of the tables
```
db.drop_all()
```

### Recording the removal of the database
```
db.session.commit()
```

### Exiting the terminal
```
exit()
```

## user icon Creating the user
### Using Flask commands
```
flask shell
```

### Creating a user
```
user = User(username="CHOSEN_USERNAME", password="CHOSEN_PASSWORD")
```

### Adding the user
```
db.session.add(user)
```

### Recording the creation of the database
```
db.session.commit()
```

### Exiting the terminal
```
exit()
```

## Docker icon Container
### Initialize and run a container
```
docker-compose up
```