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 / memos Goto Github PK
View Code? Open in Web Editor NEWThis project forked from usememos/memos
An open source, self-hosted knowledge base that works with a SQLite db file.
Home Page: https://usememos.com
License: MIT License