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())
Popular repositories Loading
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.