API Reference¶
Dokumentasi API ini dibuat secara otomatis untuk paket generatecv
.
Fungsi Inti¶
Fungsi utama untuk menghasilkan CV dan memuat data.
generatepdf()
¶
Generate a PDF CV from the provided data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cv_data
|
CV
|
CV model containing the CV data |
required |
output_path
|
str
|
Path where the PDF will be saved |
required |
style
|
str
|
Style name for the CV (e.g., 'classic', 'modern', 'minimal') |
'classic'
|
page_size
|
str
|
Size of the page ('A4' or 'letter') |
'A4'
|
Returns:
Type | Description |
---|---|
str
|
Path to the generated PDF file |
Source code in src/generatecv/pdf_generator.py
yamltocv()
¶
Convert YAML file to CV object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
output_path
|
str
|
Path where the PDF will be saved. If None, a default path is generated. |
required |
style
|
str
|
Style name for the CV (e.g., 'classic', 'modern', 'minimal') |
'classic'
|
page_size
|
str
|
Size of the page ('A4' or 'letter') |
'A4'
|
yaml_path
|
str
|
Path to the YAML file containing the CV data |
required |
Returns:
Type | Description |
---|---|
CV
|
CV object created from the YAML data |
Source code in src/generatecv/pdf_generator.py
Struktur Data Utama (generatecv.models.CV
)¶
Model Pydantic utama yang menampung semua data CV.
Bases: BaseModel
Main CV model that contains all sections.
Source code in src/generatecv/models.py
PersonalInfo
¶
Bases: BaseModel
Model for personal information section.
Source code in src/generatecv/models.py
Education
¶
Bases: BaseModel
Model for education entries.
Source code in src/generatecv/models.py
CompanyExperience
¶
Bases: BaseModel
Model for professional experience at a single company with multiple roles.
This model allows grouping multiple role entries under a single company.
Source code in src/generatecv/models.py
Role
¶
Bases: BaseModel
Model for a specific role within a company.
Source code in src/generatecv/models.py
Skill
¶
Project
¶
Bases: BaseModel
Model for projects section.
Source code in src/generatecv/models.py
Certificate
¶
Bases: BaseModel
Model for certifications section.
Source code in src/generatecv/models.py
Language
¶
Reference
¶
Bases: BaseModel
Model for professional references.
Source code in src/generatecv/models.py
Modul Lainnya¶
Styles¶
Modul generatecv.styles
menangani penampilan visual dari PDF yang dihasilkan.
CVStyle
¶
Bases: ABC
Base class for CV styling.
Source code in src/generatecv/styles/base_style.py
__init__()
¶
ClassicStyle
¶
Bases: CVStyle
Classic style for CVs.