spaceapi-server/spaceapi.py
2025-06-13 22:53:29 +02:00

39 lines
676 B
Python

from dataclasses import dataclass, field
from typing import List, Optional
from datetime import datetime
import time
@dataclass
class Location:
address: str
lat: float
lon: float
@dataclass
class Contact:
email: str
irc: str
ml: str
matrix: str
@dataclass
class State:
open: bool
lastchange: int = field(default_factory=lambda: int(time.time()))
@dataclass
class LinkedSpace:
endpoint: str
website: str
@dataclass
class SpaceAPI:
api_compatibility: List[str]
space: str
logo: str
url: str
location: Location
contact: Contact
state: State
projects: List[str]
linked_spaces: List[LinkedSpace]