If you have the option, using pip download
is the way to go, since this will also include and transient dependencies (i.e. everything that FastAPI depends on, and everything those packages depends on, etc.). For the current version of FastAPI and uvicorn, this ends up being these packages and versions:
anyio-3.6.2-py3-none-any.whl
click-8.1.3-py3-none-any.whl
colorama-0.4.6-py2.py3-none-any.whl
fastapi-0.92.0-py3-none-any.whl
h11-0.14.0-py3-none-any.whl
idna-3.4-py3-none-any.whl
pydantic-1.10.5-cp310-cp310-win_amd64.whl
sniffio-1.3.0-py3-none-any.whl
starlette-0.25.0-py3-none-any.whl
typing_extensions-4.5.0-py3-none-any.whl
uvicorn-0.20.0-py3-none-any.whl
Since every package has none
as its platform, they should all work on both Windows, OS X and Linux.
If you want database libraries (such as SQLAlchemy), the number of required packages will grow a lot.
Even if you can't install anything on the computer where you want to download the packages, if you can get the packages off that computer with a usb drive, you can install python/pip on the USB drive, and then use that pip
executable to download the packages for you.
The .whl-files can be installed using pip install <whl file>
on your computer without internet access..