Skip to main content

Dictionary

Dictionary

toothfairyai@latest…

Manager for dictionary entries operations.

This manager provides methods to create, update, and manage dictionary entries.

Example:

>>> client = ToothFairyClient(api_key="...", workspace_id="...")
>>> dictionary_entry = client.dictionary.get(...)

Accessed via client.dictionary.

Methods

MethodHTTPEndpoint
getGETGET /dictionary/get/{dictionary_entry_id}
listGETGET /dictionary/list
get_by_language_pairderived
searchderived

get

Get a dictionary_entry by ID.

def get(dictionary_entry_id: str) -> DictionaryEntry

Endpoint: GET /dictionary/get/{dictionary_entry_id} · API service

Response fields

FieldTypeDescription
idstringUnique identifier for the dictionary entry
ownerstringUser ID who owns the dictionary entry
sourceLanguagestringSource language code
targetLanguagestringTarget language code
sourceTextstringSource text to translate
targetTextstringTranslated target text
workspaceIDstringUnique workspace identifier (UUID v4)
posstringPart of speech classification
descriptionstringDictionary entry description
createdBystringUser ID who created the entry
updatedBystringUser ID who last updated the entry
createdAtstringTimestamp when this resource was created
updatedAtstringTimestamp when this resource was last updated

Example

client.dictionary.get(dictionary_entry_id="agent-id")

list

List all dictionary entries.

def list(
limit: Optional[int] = None,
offset: Optional[int] = None
) -> ListResponse

Endpoint: GET /dictionary/list · API service

Example

client.dictionary.list()

get_by_language_pair

Get dictionary entries by language pair.

def get_by_language_pair(
source_language: str,
target_language: str
) -> List[DictionaryEntry]

Derived method — delegates to another SDK call and performs no direct HTTP request.

Example

client.dictionary.get_by_language_pair(source_language="…", target_language="…")

Search dictionary entries by source text.

def search(search_term: str) -> List[DictionaryEntry]

Derived method — delegates to another SDK call and performs no direct HTTP request.

Example

client.dictionary.search(search_term="…")