#2 - Setting Up a Python API Testing Project with uv
• Possess over 14 years of experience in Quality Engineering, specializing in building test frameworks for complex systems including web applications, REST APIs, and core cloud infrastructure on platforms like Akamai's Linode and Azure.
• Skilled in the development and improvement of automation frameworks for various Web applications, service APIs displaying proficiency in TestNG, PyTest, Selenium, Rest Assured, Jenkins pipeline.
Understanding uv and its key advantages
What is uv?
uv is an extremely fast, modern Python package and project manager written in Rust, designed as an all-in-one replacement for existing tools like pip, virtualenv, pipx, and pyenv. uv promises dramatic performance gains and a simplified workflow for Python developers.
It consolidates multiple tools into a single, cohesive command-line interface. pip + venv + pip-tools + pipx — replaced by one fast tool
It fully supports pyproject.toml for defining project metadata and dependencies, aligning with modern Python packaging standards.
Advantage
pyproject.toml as the source of truth
A lockfile (uv.lock) for deterministic installs
No need to “activate” venv
Better dev vs prod dependency separation
Essential uv commands for project setup
Uv command and workflow
Setup uv and python

- Install uv and update path
curl -Ls https://astral.sh/uv/install.sh | bash |
- Verify uv is installed
uv --version |
- Install multiple python version
uv python install 3.14 |
List Python version → uv python list
Lists all Python interpreters uv can see (includes system-installed and uv-installed Python)
uv separates system Python from project Python, so OS updates can’t silently break your code or CI pipelines.
uv python list always shows system-installed Python if no Python is installed via uv, because uv discovers and reuses what the OS already provides.
Once you install Python via uv python install, uv prefers that version, but system Python remains visible as a fallback—not replaced.

- Create a file with required python version
echo "3.13" > .python-version |
- Initialize python project → uv init

- Optional - Change project description in pyproject.toml

Creating an API testing project using uv
Setup python virtual environment → uv venv --python 3.13
Install packages
uv add requests faker |
- After running above command, it updated pyproject.toml with dependencies and created uv.lock


- List dependency → uv pip list

