Sometimes, a Python library depends on additional data, such as ML models. This could be a model from transformers, spacy, nltkand so on. Typically there is a command to download such a model: python -m nltk.downloader stopwords How can I have this done automatically when my library is installed, when I use modern python packaging (pyproject.toml) and tools (uv)? The reason is that my library is used in another application and that application shouldn't be concerned what models I use under the hood. But I also don't want to download them at run time. AFAIK, there is no post install step anymore. I could provide a post install command in my package that the user would have to manually execute once. Is there any convention for this? At least for spacy, the models are distributed as wheels. However, they can't be used as dependencies by uv since they are lacking versions. Continue reading...