Created
August 18, 2023 00:12
-
-
Save ryancollingwood/528868631f6c1f51c8ab9d4d65933e54 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List | |
from pydantic import BaseModel | |
class CharacterClass(BaseModel): | |
name: str | |
is_ranged: bool | |
is_magic: bool | |
class Item(BaseModel): | |
name: str | |
class InventoryItem(BaseModel): | |
item: Item | |
quantity: int | |
class Character(BaseModel): | |
name: str | |
char_class: CharacterClass | |
inventory: List[InventoryItem] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment