from __future__ import annotations
import json
from dataclasses import asdict, dataclass
@dataclass
class BetterA:
languages: tuple[str, ...] = ("Python", "JS", "Go")
databases: tuple[str, ...] = ("SQLite", "MySQL", "MongoDB", "Redis")
misc : tuple[str, ...] = ("Docker", "Celery", "RabbitMQ", )
ongoing : tuple[str, ...] = ("Django", "DRF", "Flask", "grpc")
def jsonify(self) -> str:
return json.dumps(asdict(self), indent=4)
bettera = BetterA()
print(bettera.jsonify())
bettera / covid-19-data Goto Github PK
View Code? Open in Web Editor NEWThis project forked from owid/covid-19-data
Data on COVID-19 (coronavirus) cases, deaths, hospitalizations, tests • All countries • Updated daily by Our World in Data
Home Page: https://ourworldindata.org/coronavirus