File: _general_store.py

package info (click to toggle)
python-emmet-core 0.84.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 77,220 kB
  • sloc: python: 16,355; makefile: 30
file content (27 lines) | stat: -rw-r--r-- 744 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from pydantic import BaseModel, Field
from typing import Dict

try:
    from typing import Literal, Optional  # type: ignore
except ImportError:
    from typing_extensions import Literal, Optional  # type: ignore
from datetime import datetime


class GeneralStoreDoc(BaseModel):
    """
    Defines general store data
    """

    kind: Optional[Literal["newsfeed", "seminar", "banner"]] = Field(
        None, description="Type of the data."
    )

    markdown: Optional[str] = Field(None, description="Markdown data.")

    meta: Optional[Dict] = Field(None, description="Metadata.")

    last_updated: datetime = Field(
        description="Timestamp for when this document was last updated",
        default_factory=datetime.utcnow,
    )