Pathquest is a simple file system API using Python's http.server library.
Python 3.9 or greater is required to run the application. The code uses new type hinting features not found in earlier versions of Python.
-
Install the source using git
git clone https://github.com/aaron-ortega/pathquest.git
-
Install Python 3.9 using Pyenv
brew install pyenv pyenv install 3.9
-
[Optional] Install Postman to interact with the app
brew install --cask postman
The server can be initiated using a shell script or Docker. Both methods require a specified root path, $PATH, indicating the starting point.
-
Navigate into the cloned repo and execute the script
./entrypoint.sh $PATHNote: Verify the script has
executepermission otherwise run the followingchmod u+x entrypoint.sh.
-
Navigate into the cloned repo and build the image
cd pathquest docker build -f Dockerfile -t pathquest .
-
Run the application
docker run --rm -it -p 9000:9000 pathquest $PATH
Since http.server doesn't come with Swagger we will build a local version and point to our app.
-
Follow the steps detailed here.
-
Copy
swagger.ymlinto swagger-uicp swagger.yml ./swagger-ui/dev-helpers/swagger.yml
-
Navigate to
./swagger-ui/dev-helpers/and replaceurl: "https://petstore.swagger.io/v2/swagger.json",with
url: "./swagger.yml",
- Add implementaion of remaining CRUD operations
- Add more docs to
swagger.yml
