Small python service using Pydantic, Flask and SQLAlchemy to read a excel file.
- Create a new venv by using the following commands:
python -m venv .venv
- For macOS activate the venv by using the following command:
or on windows use:
source .venv/bin/activate
.venv\Scripts\activate
- install the required packages inside the venv using:
pip install -r requirements.txt
- Clone this repository or download the files.
git clone git@github.com:viabledata/nick-gradtask.git cd nick-gradtask
- Install the required python packages
pip install -r requirements.txt
- Run the tests using pytest before starting the flask service:
python -m pytest tests -vv
- Run the Flask app from the current directory using:
flask run --debug
This project can be used with a tool like insomnia and can be accessed by visiting the available endpoints:
- /read [POST] sends a POST request to Flask and reads the excel file
static/Library_register_data.xlsx
- /users/ [GET] sends a GET request to Flask and retrieves all users from the database.
- /users/
<name>
[GET] sends a GET request to flask with a name Path Variable.
To contribute to this project, the styleguide roughly follows the PEP-8 Style guide which can be found here:
Aside from that ensure that functions have typehints & return types specified and a docstring stating what the function does.
-
Clone the repository to your local machine.
git clone git@github.com:viabledata/documentation.git cd documentation
-
Create a new branch for your changes:
git checkout -B your-branch-name
-
Make your changes and commit them:
git commit -am "Remove pydantic and use marshmallow"
-
Push your changes:
git push
Create a pull request from your branch to the main branch. Wait for a reviewer to approve your pull request. Approval is required from two reviewers before pull requests are merged.