ExcelAlchemy 2.0 keeps the public workflow recognizable, but the project has changed meaningfully in platform support, dependencies, and architecture.
This guide focuses on what users are most likely to notice when upgrading from the
1.x line to 2.0.0.
- Python 3.10 and 3.11 are no longer supported
- Supported versions are now Python 3.12, 3.13, and 3.14
- Python 3.14 is the primary support target
- ExcelAlchemy now targets Pydantic v2
- Internal field extraction and validation integration were redesigned around adapter boundaries
If your application is still pinned to Pydantic v1, upgrade that dependency before upgrading ExcelAlchemy.
- Minio is no longer a mandatory dependency
- Storage is now modeled as the
ExcelStorageprotocol - The built-in Minio backend is still available, but as an optional extra
For all new 2.x application code, prefer:
storage=...Treat the older built-in Minio fields as compatibility-only API surface.
Base install:
pip install ExcelAlchemyInstall with built-in Minio support:
pip install "ExcelAlchemy[minio]"Prefer explicit storage objects:
from excelalchemy import ExporterConfig
from excelalchemy.core.storage_minio import MinioStorageGateway
config = ExporterConfig.for_storage(
ExporterModel,
storage=MinioStorageGateway(minio_client, bucket_name='excel-files'),
)The older minio=..., bucket_name=..., url_expires=... configuration style is
still accepted for compatibility, but:
- it is not the recommended 2.x path
- it emits a deprecation warning
- it should be treated as a migration bridge rather than a long-term API choice
If you are writing new code in the 2.x line, use storage=... instead.
The 2.2 line also adds more explicit constructors for common importer modes:
config = ImporterConfig.for_create(ImporterModel, creator=create_func, storage=storage)config = ImporterConfig.for_update(ImporterModel, updater=update_func, storage=storage)config = ImporterConfig.for_create_or_update(
create_importer_model=CreateModel,
update_importer_model=UpdateModel,
is_data_exist=is_data_exist,
creator=create_func,
updater=update_func,
storage=storage,
)If you want concrete examples of the recommended 2.x API shape, see:
- ExcelAlchemy no longer uses or installs
pandasat runtime - Workbook IO is now based on
openpyxland an internalWorksheetTable
If your application depended on pandas being installed as an indirect dependency, install it explicitly in your own project.
- Runtime exceptions are standardized in English
- Workbook-facing display text is locale-aware
- Supported display locales currently include
zh-CNanden
Example:
config = ImporterConfig(ImporterModel, creator=create_func, locale='en')excelalchemy.types.*andexcelalchemy.types.value.*are deprecated compatibility imports in the 2.x line- those imports now emit
ExcelAlchemyDeprecationWarning - the compatibility layer will be removed in ExcelAlchemy 3.0
Prefer the new module layout:
excelalchemy.metadataexcelalchemy.resultsexcelalchemy.configexcelalchemy.codecs- the
excelalchemypackage root for common public types such asLabel,Key, andUrlStr
Additional top-level module guidance:
excelalchemy.exceptionsis the stable replacement forexcelalchemy.excexcelalchemy.identityis now a compatibility import; preferfrom excelalchemy import Label, Key, UrlStr, ...excelalchemy.header_modelsis internal and should not be imported in application codedocs/public-api.mdsummarizes stable public modules, compatibility modules, and internal modules
The 2.2 line also clarifies the recommended names for inspecting import-run state from the facade:
- prefer
worksheet_tableoverdf - prefer
header_tableoverheader_df - prefer
cell_error_mapovercell_errors - prefer
row_error_mapoverrow_errors
The old names still work as compatibility aliases in the 2.x line, but new code should use the clearer names above.
- Upgrade your Python runtime to 3.12+.
- Upgrade your project to Pydantic v2.
- Decide whether you need
ExcelAlchemy[minio]or a customstorage=...implementation. - If you expose templates or import result workbooks to English-speaking users, set
locale='en'. - Run your import/export flows against
2.0.0in a staging environment before promoting it in production.