File: tree.py

package info (click to toggle)
python-odmantic 1.0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,640 kB
  • sloc: python: 8,547; sh: 37; makefile: 34; xml: 13; javascript: 3
file content (19 lines) | stat: -rw-r--r-- 429 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import enum
from typing import Dict, List

from odmantic.field import Field
from odmantic.model import Model


class TreeKind(str, enum.Enum):
    BIG = "big"
    SMALL = "small"


class TreeModel(Model):
    name: str = Field(default="Acacia des montagnes")
    average_size: float = Field(key_name="size")
    discovery_year: int
    kind: TreeKind
    genesis_continents: List[str]
    per_continent_density: Dict[str, float]