Skip to content

Instantly share code, notes, and snippets.

"""
Backend Developer Interview Task - Crypto Price Tracker
TASK:
Build a FastAPI application that fetches cryptocurrency prices from an external API
and stores them in a database with analytical endpoints.
TIME: 45 minutes
SETUP:
from django.db import models
class Phone(models.Model):
MANUFACTURERS = {'samsung': 'PhoneSamsung',
'apple': 'PhoneApple'}
name = models.CharField(max_length=128)
manufacturer = models.CharField(max_length=128, default='samsung')
unique_params = models.ForeignKey(MANUFACTURERS[str(manufacturer)],
on_delete=models.CASCADE)