Thanks to visit codestin.com
Credit goes to github.com

Skip to content

♻️ Add support for pip install "fastapi[standard]" with standard dependencies and python -m fastapi#11935

Merged
tiangolo merged 9 commits into
masterfrom
fastapi-standard
Aug 2, 2024
Merged

♻️ Add support for pip install "fastapi[standard]" with standard dependencies and python -m fastapi#11935
tiangolo merged 9 commits into
masterfrom
fastapi-standard

Conversation

@tiangolo

@tiangolo tiangolo commented Aug 2, 2024

Copy link
Copy Markdown
Member

♻️ Add support for pip install "fastapi[standard]" including the standard dependencies, the CLI, Uvicorn, etc. and make fastapi not include the optional standard dependencies. fastapi and fastapi-slim are now the same.

This also adds support for calling it with:

python -m fastapi

And if someone doesn't install fastapi[standard] and tries to call the fastapi command, it will show them an error telling them to install fastapi[standard].

Summary

Install with:

pip install "fastapi[standard]"

This also upgrades fastapi-cli[standard] >=0.0.5.

Technical Details

Before this, fastapi would include the standard dependencies, with Uvicorn and the fastapi-cli, etc.

And fastapi-slim would not include those standard dependencies.

Now fastapi doesn't include those standard dependencies unless you install with pip install "fastapi[standard]".

Before, you would install pip install fastapi, now you should include the standard optional dependencies (unless you want to exclude one of those): pip install "fastapi[standard]".

This change is because having the standard optional dependencies installed by default was being inconvenient to several users, and having to install instead fastapi-slim was not being a feasible solution.

Discussed here: #11522 and here: #11525

@tiangolo tiangolo changed the title ♻️ Add support for pip install "fastapi[standard]" including the standard dependencies, the CLI, Uvicorn, etc. and make fastapi not include the optional standard dependencies. fastapi and fastapi-slim are now the same. ♻️ Add support for pip install "fastapi[standard]" with standard dependencies Aug 2, 2024
@github-actions

github-actions Bot commented Aug 2, 2024

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 15f0b97 at: https://61384e88.fastapitiangolo.pages.dev

@github-actions

github-actions Bot commented Aug 2, 2024

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit c4282be at: https://ad2ec833.fastapitiangolo.pages.dev

@tiangolo tiangolo changed the title ♻️ Add support for pip install "fastapi[standard]" with standard dependencies ♻️ Add support for pip install "fastapi[standard]" with standard dependencies and python -m fastapi Aug 2, 2024
@tiangolo tiangolo added breaking and removed refactor labels Aug 2, 2024
@tiangolo tiangolo merged commit a25c92c into master Aug 2, 2024
@tiangolo tiangolo deleted the fastapi-standard branch August 2, 2024 06:03
@hamadrehman

Copy link
Copy Markdown

image
is this a typo ?
python -m fastapi instead of python -m python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants