animaldna / catalog-api

A "clone" of the Discogs API built with FastAPI and DynamoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircleCI Github

Cronenberg's Discogs API

This project is a "clone" of the public Discogs API built using FastAPI. Data is stored in DynamoDB using a single-table design. (Shout out to Alex DeBrie for putting together an excellent resource explaining this tricky concept.) It's using a very limited dataset pulled from Discogs.

The API itself was actually a secondary focus; my main goals were to:

  1. Get hands-on experience with DynamoDB, specifically optimized table design
  2. Have a "real world" project I could use to work with CircleCI, Terraform, and ECS. The main Terraform project can be found here.

Technologies

  • Python 3.9
  • fastAPI 0.70.1
  • slowapi 0.1.5
  • Uvicorn 0.16.0
  • boto3 1.20.23
  • DynamoDB
  • CircleCI

CI/CD Pipeline

The default pipeline pulls the task template from ECS, updates it with jq, registers the new task definition, and updates the service. Everything but the build step runs on a custom image based on python:3.9-buster-slim.

Default CI/CD Pipeline

CircleCI TODOs

  • Slack notifications
  • Version with deployment via runner
  • Version with deployment via Lambda
  • Version with CodePipeline blue/green deployment
  • Slack approvals

API TODOs

Right now I'm focused on the CI/CD pipeline and project infrastructure, so the API TODOs are back-burner.

Routes

  • /albums?genre="foo"&style="bar"
  • /albums/latest
  • /albums?artist=1234567 (alias for /artists/1234567/albums)
  • /albums
  • /artists

Misc.

  • Logging to file
  • Exception for ConnectionErrors
  • Sorting
  • Pagination

Feedback

This is a personal project and a work in progress, but I'm always open to receiving any and all feedback about anything I'm working on. Feel free to open an issue and drop your thoughts.

Author

Chloe Boylan

License

Copyright © 2022 Chloe Boylan. This project is MIT licensed.

About

A "clone" of the Discogs API built with FastAPI and DynamoDB

License:MIT License


Languages

Language:Python 97.8%Language:Dockerfile 2.2%