Hidden Gem
This backend application REST API boilerplate using flask
- See user
- Create user
- Flask
- Python
-
Clone the repository:
git clone https://github.com/Achmadqizwini/flask_rest_boilerplate
-
Create virtual environment:
python -m venv venv
python3 -m venv venv
-
Activate virtual environment:
.\venv\Scripts\activate
source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Copy .env-template file and rename it to .env, contact your administrator to get the credentials
-
Run the application:
flask run
-
Run the tests:
flask test
or
pytest
Run a specific test file:
pytest -k path-to-test-file
Run a specific test file while seeing the print statement:
pytest -k path-to-test-file -s
-
DB related:
flask db init flask db migrate flask db upgrade
-
Format the python file:
black path-to-file
or in a directory consisting the files:
black .
Explain any configuration settings or environment variables that need to be set.
Provide instructions on how to use your application. Include any examples or screenshots that may be helpful.
If you'd like to contribute to the project, please follow these guidelines:
- Fork the repository.
- Create a new branch.
- Make your changes and commit them.
- Submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.