API Reference
This section provides detailed documentation for the Python Release Master API.
AI Module
- python_release_master.core.ai.generate_changelog_with_ai(sections: List[str], model: str = 'gpt-4-0125-preview') Dict[str, Any] [source]
Generate a changelog using OpenAI with structured output.
- Parameters:
sections – List of section names to organize changes (e.g., [“Features”, “Bug Fixes”])
model – OpenAI model to use (default: “gpt-4-0125-preview”)
- Returns:
Dictionary containing changelog data with the following structure:
{ "version_bump": "major|minor|patch", "bump_reason": "explanation of why this bump type was chosen", "changes": [ { "title": "commit/PR title", "description": "detailed description", "section": "one of the available sections", "type": "feat|fix|docs|style|refactor|test|chore", "breaking": boolean } ], "changelog_md": "final markdown formatted changelog with sections" }
- python_release_master.core.ai.commit_changes_with_ai() str | None [source]
Generate commit message and commit changes using AI.
- Returns:
The generated commit message if changes were committed, None otherwise.
Release Module
- python_release_master.core.release.create_release(bump_type: str, title: str, description: str | None, config: Config, skip_steps: List[str] | None = None) None [source]
Create a new release.
- Parameters:
bump_type – Type of version bump (“major”, “minor”, “patch”)
title – Release title
description – Optional release description
config – Release configuration
skip_steps – Optional list of steps to skip
Configuration
- class python_release_master.core.config.Config[source]
Main configuration for Python Release Master.
- changelog: ChangelogConfig
Configuration for changelog generation.