CRU API designed to handle REST petitions to create, read and update properties in a mongo database. It can save images in a static folder and asociate them to properties. It can also create owners and asociate the properties to them. The price of a property with a given ID can be updated. Testing has been implemented for the methods in the routers for both the properties and the owners.
-
Clone the repository
-
Create a virtual environment
% python -m venv env
-
Activate the virtual environment
% source env/bin/activate
-
Install the requirements
% pip3 install -r requirements.txt
-
Run the tests
% pytest
-
Run the API
% python main.py
-
Enjoy
Once the service is runnig, you can access the API in your browser using the url: http://127.0.0.1:8000/ The documentation can be visited in the swagger using the url: http://127.0.0.1:8000/docs There you can test all the features.