Skip to main content

generatecv

CI Security Documentation codecov PyPI version Python 3.13+ License: MIT

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.

Metadata

Release files for generatecv 0.0.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for generatecv 0.0.15
File Size Uploaded Provenance Actions
generatecv-0.0.15.tar.gz 17.5 kB With provenance Details for generatecv-0.0.15.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for generatecv 0.0.15
File Interpreter ABI Platform Actions
generatecv-0.0.15-py3-none-any.whl Python 3 none any Details for generatecv-0.0.15-py3-none-any.whl

Total release size: 35.6 kB

Release files / generatecv-0.0.15.tar.gz

Download URL generatecv-0.0.15.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
91e2c636096a2e2f0eeb9b84c946b89a4532fea5a8da16237839325a045cbfcf
BLAKE2b-256 checksum
How to use checksums
76d2938ec7685c2b334be56a25af7e45900533d14af2874b22fb6174932eace4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 26, 2025.

Transparency log

Release files / generatecv-0.0.15-py3-none-any.whl

Download URL generatecv-0.0.15-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
685cae2922383ea839cde1e83bf17a8571cc660ed18f4812e09718017c8de869
BLAKE2b-256 checksum
How to use checksums
a3ee1b17305d1e7c6b3ceee89c8381cdac72f98ffc15ddcecf87727a1e0718fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 26, 2025.

Transparency log

Security for generatecv 0.0.15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for generatecv-0.0.15.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 26, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page