Syllable

This module contains a basic Syllable Model

class loglan_core.syllable.BaseSyllable(name, type_, allowed)[source]

Bases: BaseModel

Base Syllable’s DB Model

Describes a table structure for storing information about loglan syllables.

<details><summary>Show Examples</summary><p> ```python {‘id’: 37, ‘name’: ‘zv’, ‘type_’: ‘InitialCC’, ‘allowed’: True}

{‘id’: 38, ‘name’: ‘cdz’, ‘type_’: ‘UnintelligibleCCC’, ‘allowed’: False} ``` </p></details>

__str__()[source]

Returns:

allowed: Mapped[bool]

Is this syllable acceptable in grammar bool : nullable=False, unique=False

created: Mapped[datetime]

A class attribute mapped to a column in the database table. It represents the timestamp when a row is created. The default value is the current timestamp, and it can’t be null.

Type:

datetime

id: Mapped[int]

A class attribute mapped to a column in the database table. It serves as the primary key for the table.

Type:

int

name: Mapped[Annotated[str]]

Syllable itself str : max_length=8, nullable=False, unique=False

type_: Mapped[Annotated[str]]

Syllable’s type str : max_length=8, nullable=False, unique=False

updated: Mapped[datetime | None]

A class attribute mapped to a column in the database table. It represents the timestamp when a row is last updated. Whenever the row is updated, this timestamp is automatically set to the current time. It can be null if the row has never been updated.

Type:

datetime