Dependencies¶
How-to¶
Edit
requirements.in
(note.in
, not.txt
) to add your application-specific dependencies.Create the
.txt
versions of therequirements
files by running:python run.py deps compile
Update your local dev environment by running:
uv pip sync requirements-dev.txt
Commit and push the changed
requirements
files to Git.
In more detail¶
The dependencies are split up into:
requirements.in
: Your application-specific top-level dependencies. This is usually the only file you should edit.requirements-core.in
: Dependencies required by xlwings Server.requirements-dev.in
: Additional dependencies only required during development.
Each .in
file has an autogenerated .txt
file, these are the lock files where all dependencies incl. sub-dependencies are pinned.
Add your own dependencies to requirements.in
(again, note the .in
, not .txt
). If you have a development dependency, add it to requirements-dev.in
instead. If you need to pin a dependency to a certain version, you also do that in the .in
version of your requirements file.
After changing any dependencies via .in
file, you need to run python run.py deps compile
, which uses uv under the hood.
Here’s an example of requirements.in
:
-r requirements-core.txt # Don't delete this line
pandas
numpy==1.26.4
When you first clone xlwings Server, there will be a few dependencies in requirements.in
. They are there to make the examples work out of the box, but you should replace them with your own top-level dependencies.