ahmetkorkmaz3 / rednafi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

​
import json
from dataclasses import asdict, dataclass


@dataclass
class Stack:
    languages   : tuple = ("Python", "Bash", "JavaScript")
    databases   : tuple = ("PostgreSQL", "Mongo", "Redis")
    misc        : tuple = ("Docker", "Celery", "RabbitMQ")
    ongoing     : tuple = ("Django", "DRF", "Trio")

    def serialize(self):
        return json.dumps(asdict(self), indent=4)


stack = Stack()
print(stack.serialize())
​

About

License:MIT License