Skip to content

Idea

The idea for the file-api is to showcase my API documentation abilities. I used claude desktop to code a locally hosted API that I could generate an OpenAPI spec from and deploy with the Swagger UI.

I wanted a secure location since the API is exposed to the internet.

Frameworks

I used python and fastapi for the framework. I wanted something that was easy to create and deploy. fastapi create a yml file by default.

Prompt

I first prompted claude desktop about what my goal was. I asked what would be the easiest to do, and why. I was presented with three options, but the end of the output suggested that I use the python \ fastapi combo since it accomplished my goals and was the most straightforward.

Next, I outlined two core API functions. The first function downloads a txt file from a specified folder, requiring the folder name as an input parameter. The second function retrieves a list of all files within a given folder, also requiring the folder name as a parameter.

I made sure to add that I wanted the highest level of security since I would be testing the endpoints on my local when it's connected to the internet.

Result

File API