templates

class typy.templates.Template[source]

Bases: BaseModel

verification_config: ClassVar[VerificationConfig | None] = None

Optional post-render verification constraints for this template. Set to a VerificationConfig instance on a subclass to enforce page-count, font-policy, or placeholder checks automatically when typy render --verify is used.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

get_data()[source]
Return type:

dict

class typy.templates.LetterTemplate(*, sender_name, sender_address, recipient_name, recipient_address, date, subject, body, closing='Sincerely', signature_name, logo='')[source]

Bases: Template

Parameters:
  • sender_name (str)

  • sender_address (str)

  • recipient_name (str)

  • recipient_address (str)

  • date (str)

  • subject (str)

  • body (Content)

  • closing (str)

  • signature_name (str)

  • logo (str)

sender_name: str
sender_address: str
recipient_name: str
recipient_address: str
date: str
subject: str
body: Content
closing: str
signature_name: str
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.InvoiceItem(*, description, quantity, unit_price)[source]

Bases: BaseModel

Parameters:
  • description (str)

  • quantity (float)

  • unit_price (float)

description: str
quantity: float
unit_price: float
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.InvoiceTemplate(*, company_name, company_address, client_name, client_address, invoice_number, date, due_date, items, tax_rate=None, notes=None, logo=None)[source]

Bases: Template

Parameters:
  • company_name (str)

  • company_address (str)

  • client_name (str)

  • client_address (str)

  • invoice_number (str)

  • date (str)

  • due_date (str)

  • items (list[InvoiceItem])

  • tax_rate (float | None)

  • notes (str | None)

  • logo (Path | None)

company_name: str
company_address: str
client_name: str
client_address: str
invoice_number: str
date: str
due_date: str
items: list[InvoiceItem]
tax_rate: float | None
notes: str | None
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.Slide(*, title, subtitle=None, body, footnote=None, layout_variant=None, notes=None)[source]

Bases: BaseModel

Parameters:
  • title (str)

  • subtitle (str | None)

  • body (Content)

  • footnote (str | None)

  • layout_variant (str | None)

  • notes (str | None)

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

title: str
subtitle: str | None
body: Content
footnote: str | None
layout_variant: str | None
notes: str | None
class typy.templates.PresentationTemplate(*, title, subtitle=None, author, date, slides, theme=None)[source]

Bases: Template

Parameters:
  • title (str)

  • subtitle (str | None)

  • author (str)

  • date (str)

  • slides (list[Slide])

  • theme (str | None)

title: str
subtitle: str | None
author: str
date: str
slides: list[Slide]
theme: str | None
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.AcademicAuthor(*, name, affiliation='')[source]

Bases: BaseModel

Parameters:
  • name (str)

  • affiliation (str)

name: str
affiliation: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.AcademicTemplate(*, title, authors, abstract, keywords, body, two_column=False, bibliography_path=None)[source]

Bases: Template

Parameters:
  • title (str)

  • authors (list[AcademicAuthor])

  • abstract (str)

  • keywords (list[str])

  • body (Content)

  • two_column (bool)

  • bibliography_path (Path | None)

title: str
authors: list[AcademicAuthor]
abstract: str
keywords: list[str]
body: Content
two_column: bool
bibliography_path: Path | None
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.BasicTemplate(*, title, date, author, body)[source]

Bases: Template

Parameters:
  • title (str)

  • date (str)

  • author (str)

  • body (Content)

title: str
date: str
author: str
body: Content
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.CVContact(*, email='', phone='', location='', links=[])[source]

Bases: BaseModel

Parameters:
  • email (str)

  • phone (str)

  • location (str)

  • links (list[str])

email: str
phone: str
location: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.CVExperience(*, title, company, start_date, end_date, location='', description='')[source]

Bases: BaseModel

Parameters:
  • title (str)

  • company (str)

  • start_date (str)

  • end_date (str)

  • location (str)

  • description (str)

title: str
company: str
start_date: str
end_date: str
location: str
description: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.CVEducation(*, degree, institution, start_date, end_date, location='', description='')[source]

Bases: BaseModel

Parameters:
  • degree (str)

  • institution (str)

  • start_date (str)

  • end_date (str)

  • location (str)

  • description (str)

degree: str
institution: str
start_date: str
end_date: str
location: str
description: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.CVLanguage(*, name, level)[source]

Bases: BaseModel

Parameters:
  • name (str)

  • level (str)

name: str
level: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.CVCertification(*, name, issuer, date)[source]

Bases: BaseModel

Parameters:
  • name (str)

  • issuer (str)

  • date (str)

name: str
issuer: str
date: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.CVTemplate(*, name, contact, summary='', experience, education, skills, languages=[], certifications=[])[source]

Bases: Template

Parameters:
name: str
contact: CVContact
summary: str
experience: list[CVExperience]
education: list[CVEducation]
skills: list[str]
languages: list[CVLanguage]
certifications: list[CVCertification]
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class typy.templates.ReportTemplate(*, title, subtitle=None, author, date, body, abstract=None, toc=True)[source]

Bases: Template

Parameters:
  • title (str)

  • subtitle (str | None)

  • author (str)

  • date (str)

  • body (Content)

  • abstract (Content | None)

  • toc (bool)

title: str
subtitle: str | None
author: str
date: str
body: Content
abstract: Content | None
toc: bool
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].