Queue/stack API

Queue/stack API

6 devlogs
12h 9m
•  Ship certified

Silly online "queue" structure where people can POST to and GET from. The OpenAPI docs page allows you to craft requests and test the API endpoints.

Timeline

Ship 1

1 payout of shell 62.0 shells

StrawberryPuding

1 day ago

StrawberryPuding Covers 6 devlogs and 12h 9m
Earned sticker

I improved the OpenAPI docs (added actual help messages, example values etc+improved type annotation) and deployed it! https://queue-api.strawberry.hackclub.app/docs

Update attachment

I added sanitisation to all my database queries (silly me forgot before and just did f strings :p ). I also added endpoints for getting the length of a queue, and changing the read and write keys of a queue using its delete key.

Update attachment

added PUT and DELETE endpoints and tested the whole thing. read, write and delete passwords all work!

Update attachment

Got the FastAPI server working! sqlite was annoying me about database locks, so I had to rework my code a bit. with the basic POST and GET methods done, I'll add queue creation and deletion to the API next

Update attachment
StrawberryPuding StrawberryPuding about 2 months ago
weh, apparently I can’t edit the post with content. the a.g() method i have in the right window is a GET request from my quick testing script, stack=True just switches the endpoints

I completed all the functions I needed for queue manipulation. these respectively create/drop a queue database and add it to/remove it from the queue_manager structure

Update attachment

I added the queue database structure, wrote functions which interact with it and added support for multiple queue databases+another database to keep track of them. if endpointer wants me to use a database, i will sure as hell do that!

Update attachment