Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/volt1c/employee_management_api

👔API for managing and controlling employees schedules
https://github.com/volt1c/employee_management_api

api bycrypt crud flask jwt pylint python sqlalchemy

Last synced: about 1 month ago
JSON representation

👔API for managing and controlling employees schedules

Awesome Lists containing this project

README

        

# Employee Management API
![pylint workflow](https://github.com/volt1c/employee_management_api/actions/workflows/pylint.yml/badge.svg)

## Instruction

### 1. Install Packages
```shell
$ pip install -r requirements.txt
```

### 2. Create database

### 3. Correct environment variables file
Set your database URI and jwt secret key
```dotenv
# .env
# Host Config
HOST='0.0.0.0'
PORT=80
ENV='production'
DEBUG=False

# Database Config
SQLALCHEMY_DATABASE_URI_DEV='mysql://username:password@address/database_name'
SQLALCHEMY_TRACK_MODIFICATIONS=False

# Auth Config
JWT_SECRET_KEY='some_jwt_secret_key'

# Routes Config
ROUTE_ADMIN_REGISTRATION=True
```

### 4. Run application

### 5. Register Admins
Send new admin to `/api/auth/register`
```json
{
"username": "",
"password": "",
"email": ""
}
```

### 6. Disable admins registration
```dotenv
# .env
...
ROUTE_ADMIN_REGISTRATION=False
```

### 7. Restart application