I don't think there is a readily available intermediate lockfile API that can be used at this moment. We were facing the same problem, and I have been researching for the same solution.rules_python has an experimental lock API, but again, it doesn't generate the intermediate uv.lockfile. On the other hand, rules_uv performs the pyproject.toml to requirements.txt translation you mentioned.