This is an RestApi built with Flask and Flask-RESTful.
- Python Installed (Recommended version 3.8 or above)
- Pip Package Manager (pip)
-
Download this repository with git clone or by clicking the download as archive on this page
git clone https://github.com/Fer-Bar/selenium-bot-python.git
Go to the project directory.
cd bookmarksrestapi
-
Create a virtual environment:
py -m venv venv
Once created you can activate it.
venv\Scripts\activate.bat
pip install virtualenv virtualenv venv
Once created you can activate it.
source venv/bin/activate
-
Install dependencies with
pip install -r requirements.txt
. Make sure everything is installed properly withpip freeze
. -
The last step is run the main.py file, if you want you can change the host and the port. For example:
app.run(host='localhost', port=9000, debug=True)
-
To run tests, run the following command:
python -m pytest -v
-
To run the migrations, just run the following commands:
This command adds a
migrations
directory in the root of your project. This is a directory where all the migration scripts are going to be stored.flask db init
The next step in the process is to create an initial migration, using the
migrate
command:flask db migrate -m "Initial migration."
Then you can apply the migration to the database:
flask db migrate -m "Initial migration."
👤 Fernando Barrientos
- Website: fer-bar.github.io
- Github: Fer-Bar
- LinkedIn: Fernando Barrientos