CS504070 - FastAPI Tutorials
  • 🧩CS504070 - FastAPI Tutorials
  • πŸ”ŽUnit 1: Python Type Hint
  • βš™οΈUnit 2: Pydantic
  • πŸ”ƒUnit 3: Concurrency
  • πŸ’ΎUnit 4: Install FastAPI
  • πŸ‰Unit 5: Hello World!
  • 🍌Unit 6: Path Parameters
  • πŸ‹Unit 7: Query Parameters
  • 🍊Unit 8: Request Body
  • 🍐Unit 9: Query Parameters and Validations
  • 🍎Unit 10: Path Parameters and Validations
  • 🍏Unit 11: Multiple Parameters
  • πŸ‡Unit 12: Request Body - List Fields and Nested Models
  • πŸ“Unit 13: Data Types
  • πŸͺUnit 14: Cookie Parameters
  • 🫐Unit 15: Header Parameters
  • 🍈Unit 16: Response Model - Return Type
  • πŸ’Unit 17: Additional Models
  • πŸ₯‘Unit 18: Implementing JWT Authentication with FastAPI
  • βš™οΈAppendix A
  • 🍭Appendix B
Powered by GitBook
On this page
  • Creation of virtual environments
  • Install FastAPI

Unit 4: Install FastAPI

PreviousUnit 3: ConcurrencyNextUnit 5: Hello World!

Last updated 3 months ago

Creation of virtual environments

A virtual environment is created on top of an existing Python installation, known as the virtual environment’s "base” Python, and may optionally be isolated from the packages in the base environment, so only those explicitly installed in the virtual environment are available.

There is a wide range of virtual environment modules in Python:

  • (Recommended for beginners)

must be installed on your computer before installing virtual environment modules. For macOS, you can take advantage of to install virtual environment modules.

Taking as an example:

  • To install, execute this command in CMD/Terminal: pip install virtualenvwrapper

  • To create a new virtual environment: mkvirtualenv env1

  • To deactivate a virtual environment: deactivate

  • You can refer to to discover more useful commands in virtualenvwrapper.


Install FastAPI

For the tutorial, you might want to install FastAPI with all the optional dependencies and features, by executing the below command in a virtual environment:

pip install "fastapi[all]"
venv
virtualenv
virtualenvwrapper
Anaconda
Python
Homebrew
virtualenvwrapper
this document
πŸ’Ύ
Page cover image