Description
The --config parameter in the Advanced Alchemy CLI is designed to be used from the user's project root. However, it currently only supports passing package-internal modules. Attempting to use external modules will result in the following error:
Error loading config: No module named '<module_name>'
URL to code causing the issue
No response
MCVE
Run the following command with any arbitrary module path:
uv run alchemy --config <any module path> init
This will fail with the error Error loading config
Run the command using a valid internal module
uv run alchemy --config advanced_alchemy.base init
This works as expected and pass further
Steps to reproduce
1.Initialize a new project
- Add Advanced Alchemy with CLI extras
uv add advanced-alchemy[cli]
- Create a
alchemy_config.py file in the project root with the following content
from advanced_alchemy.config import SQLAlchemyAsyncConfig
connection_string = "postgresql+psycopg://postgres:postgres@domain:5432/pandoradb"
config = SQLAlchemyAsyncConfig(connection_string=str(connection_string))
- Run the CLI with your config
uv run alchemy --config alchemy_config.config init
- Observe the error:
Error loading config: No module named 'alchemy_config'
Screenshots
No response
Logs
Package Version
uv 0.7.11
cpython-3.13.3-linux-aarch64-gnu
advanced-alchemy 1.4.4
Platform
Description
The --config parameter in the Advanced Alchemy CLI is designed to be used from the user's project root. However, it currently only supports passing package-internal modules. Attempting to use external modules will result in the following error:
Error loading config: No module named '<module_name>'URL to code causing the issue
No response
MCVE
Run the following command with any arbitrary module path:
This will fail with the error
Error loading configRun the command using a valid internal module
This works as expected and pass further
Steps to reproduce
1.Initialize a new project
alchemy_config.pyfile in the project root with the following contentError loading config: No module named 'alchemy_config'Screenshots
No response
Logs
Package Version
uv 0.7.11
cpython-3.13.3-linux-aarch64-gnu
advanced-alchemy 1.4.4
Platform