publish_boto3_dataclass

Main Boto3 Dataclass Package Builder.

This module provides the builder for the main boto3_dataclass package, which serves as the umbrella package that imports and exposes all AWS service dataclass packages. This package acts as the central entry point for users who want access to all boto3 dataclass functionality.

class boto3_dataclass.builders.publish_boto3_dataclass.Boto3DataclassBuilder(version: str, structure: ~boto3_dataclass.structures.pyproject.PyProjectStructure, service_names: list[str] = <factory>)[source]

Builder for the main boto3_dataclass umbrella package.

This class creates the main boto3_dataclass package that serves as an umbrella package importing and exposing all AWS service dataclass packages. It extends PyProjectBuilder to provide specialized functionality for building the central package that users install to get access to all boto3 dataclass functionality.

The builder handles:

  • Discovering all available AWS service packages

  • Generating imports for all service packages in __init__.py

  • Creating package dependencies on all service packages

  • Building package configuration files

Parameters:
  • structure – PyProjectStructure instance for package management

  • service_names – List of AWS service names to include in the package

Example:
>>> builder = Boto3DataclassBuilder.new(version="1.0.0")
>>> builder.service_names  # ["ec2", "s3", "lambda", ...]
>>> builder.build_all()  # Build complete package structure
>>> builder.structure.poetry_build()  # Build with Poetry
>>> builder.structure.twine_upload()  # Upload to PyPI

Package Structure:

build/repos/boto3_dataclass-project/
├── boto3_dataclass/
│   └── __init__.py          # Imports all service packages
├── pyproject.toml           # Dependencies on all service packages
├── README.rst
└── LICENSE.txt
classmethod new(version: str = '1.40.0', package_name: str = 'boto3_dataclass')[source]

Create a new Boto3DataclassBuilder with auto-discovered services.

This factory method automatically discovers all available AWS services by scanning installed mypy-boto3 stub packages and creates a builder configured to include all of them.

Parameters:
  • version – Package version for the main package

  • package_name – Name of the main package (defaults to “boto3_dataclass”)

Returns:

Configured Boto3DataclassBuilder instance

Example:
>>> builder = Boto3DataclassBuilder.new(version="1.2.0")
>>> len(builder.service_names)  # Number of discovered services
50+
log(ith: int | None = None)[source]

Log the current package being worked on with its repository path.

Parameters:

ith – Optional sequence number (unused in main package building)

build_all()[source]

Build all components of the main boto3_dataclass package.

This method orchestrates the complete build process for the umbrella package:

  1. Cleans the output directory

  2. Creates boto3_dataclass/__init__.py with imports for all services

  3. Creates pyproject.toml with dependencies on all service packages

  4. Creates README.rst documentation

  5. Creates LICENSE.txt file

The resulting package structure allows users to import boto3_dataclass and access all AWS service dataclasses through a single import.

build_init_py()[source]

Build the main package __init__.py file from template.

Creates the package initialization file that imports and exposes all available AWS service dataclass packages. This allows users to access all functionality through the main package.

build_pyproject_toml()[source]

Build the pyproject.toml configuration file from template.

Creates the Poetry/PEP 518 project configuration file with:

  • Package metadata and description

  • Dependencies on all service-specific dataclass packages

  • Optional dependencies

  • Build system configuration

build_README_rst()[source]

Build the README.rst documentation file from template.

Creates the package documentation with:

  • Installation instructions

  • Usage examples showing how to use different services

  • API reference and available services list

build_LICENSE_txt()[source]

Build the LICENSE.txt file from template.

Creates the software license file for the package distribution. Uses the common license template shared across all packages.