generatecv is a Python package for generating professional CVs (resumes) from structured data.
Project description
generatecv
A Python package for generating professional CVs from structured data.
Installation
pip install generatecv
Or using uv:
uv add generatecv
For development:
# Clone the repository
git clone https://github.com/yantology/generatecv.git
cd generatecv
# Create and activate a virtual environment
uv venv
# Install the package and development dependencies
uv pip install -e ".[dev]"
Quick Start
1. Get the Example Template
After installation, use the built-in command to get a starter template:
# Download example YAML to current directory
generatecv-example
# Or specify a custom output path
generatecv-example --output my_cv_data.yaml
This creates an example.yaml file with sample CV data that you can customize.
2. Customize Your Data
Edit the generated YAML file with your information:
personal_info:
name: "Your Name"
email: "your.email@example.com"
phone: "+1234567890"
location: "Your City, Country"
# ... customize other fields
3. Generate Your CV
from generatecv.pdf_generator import yamltocv, generatepdf
# Load your CV data from YAML
cv_data = yamltocv("example.yaml") # or your custom filename
# Generate PDF
output_path = generatepdf(
cv_data=cv_data,
output_path="my_cv.pdf",
style="classic",
page_size="A4"
)
print(f"CV generated: {output_path}")
Alternative: Pure Python Usage
You can also define your CV data directly in Python:
from generatecv.pdf_generator import generatepdf
from generatecv.models import CV, PersonalInfo, Education, CompanyExperience, Role
cv_data = CV(
personal_info=PersonalInfo(
name="Your Name",
email="your.email@example.com",
phone="+1234567890",
location="Your City, Country",
summary="Your professional summary",
title="Your Job Title"
),
education=[
Education(
institution="University Name",
degree="Your Degree",
start_date="2019",
end_date="2023"
)
],
experience=[
CompanyExperience(
company="Company Name",
location="Company Location",
roles=[
Role(
title="Your Role",
start_date="2023-01",
end_date="Present",
description="Your role description"
)
]
)
]
)
# Generate PDF
generatepdf(cv_data, "my_cv.pdf")
Development
Type Checking
This project uses pyrefly for static type checking:
# Run type checking
pyrefly check
# Suppress errors temporarily during migration
pyrefly check --suppress-errors
Testing
Tests are written using pytest:
# Run all tests
pytest
# Run with coverage
pytest --cov=generatecv
# Generate coverage report
pytest --cov=generatecv --cov-report=html
Linting
This project uses ruff for linting:
# Run linter
ruff check .
# Automatically fix issues
ruff check --fix .
Code Formatting
Code formatting is done with black:
# Format code
black .
# Format code with line length of 80 characters
black --line-length 80 .
Project Structure
generatecv/
├── src/
│ ├── generatecv/ # Main package
│ │ ├── __init__.py
│ │ └── cv_generator.py
│ ├── tool/ # CLI tools
│ │ ├── __init__.py
│ │ └── main.py
│ └── py.typed # PEP 561 marker
├── tests/ # Test directory
│ ├── test_cv_generator.py
│ └── test_example.py
├── pyproject.toml # Project configuration
└── README.md # This file
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file generatecv-0.0.15.tar.gz.
File metadata
- Download URL: generatecv-0.0.15.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91e2c636096a2e2f0eeb9b84c946b89a4532fea5a8da16237839325a045cbfcf
|
|
| MD5 |
f824e4fbdc2d9408f330548538bcd54a
|
|
| BLAKE2b-256 |
76d2938ec7685c2b334be56a25af7e45900533d14af2874b22fb6174932eace4
|
Provenance
The following attestation bundles were made for generatecv-0.0.15.tar.gz:
Publisher:
publish.yml on yantology/generatecv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
generatecv-0.0.15.tar.gz -
Subject digest:
91e2c636096a2e2f0eeb9b84c946b89a4532fea5a8da16237839325a045cbfcf - Sigstore transparency entry: 219902847
- Sigstore integration time:
-
Permalink:
yantology/generatecv@5e44ddeb3374dcea5b045bcbf54d96881a1f60a4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yantology
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5e44ddeb3374dcea5b045bcbf54d96881a1f60a4 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file generatecv-0.0.15-py3-none-any.whl.
File metadata
- Download URL: generatecv-0.0.15-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
685cae2922383ea839cde1e83bf17a8571cc660ed18f4812e09718017c8de869
|
|
| MD5 |
480ec1f8625221b8191cb6c29baf8ce2
|
|
| BLAKE2b-256 |
a3ee1b17305d1e7c6b3ceee89c8381cdac72f98ffc15ddcecf87727a1e0718fc
|
Provenance
The following attestation bundles were made for generatecv-0.0.15-py3-none-any.whl:
Publisher:
publish.yml on yantology/generatecv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
generatecv-0.0.15-py3-none-any.whl -
Subject digest:
685cae2922383ea839cde1e83bf17a8571cc660ed18f4812e09718017c8de869 - Sigstore transparency entry: 219902848
- Sigstore integration time:
-
Permalink:
yantology/generatecv@5e44ddeb3374dcea5b045bcbf54d96881a1f60a4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yantology
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5e44ddeb3374dcea5b045bcbf54d96881a1f60a4 -
Trigger Event:
workflow_run
-
Statement type: