# Getting Started with FastAPI [chapter 1]

Fastapi is very easy and everyone can learn. I never read the introduction line so i like to move straight to the api development

» In the tutorial i am using a ubuntu device

Make a very basic fastAPI project

```plaintext
# Create the Root project folder
>> mkdir projectName

# Create the virtual environment for the project
>> cd projectName
>> python3 -m venv envfolderName
>> . envfoldername/bin/activate

# Install FastAPI
>> pip freeze > requirements.txt
>> pip install "fastapi[standard]"
```

Now that we have make a project folder and installed the fastapi. let’s create the simple api

But Before this, let create the app folder inside root folder

```plaintext
# Making the app folder inside the root folder
>> mkdir app
>> cd app && touch main.py
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1728584722970/e6063b6b-a92d-4abd-a125-9666e1fbde6d.png align="center")

Let’s revise the previous steps with reference with this image.

**First watch at the folder structure.**

My root folder is tutorial1 which is cannot be seen in the image. I create the virtual environment folder name “.venv”, and my i created the folder name “app” which will now contain my all api code.

**Second let’s write some code in main.py file**

The main.py which will serve the basic api. In the above image there is main.py. This is what we need. I will not explain the code as it is very simple to understand. Now the script to run the main.py code.

```plaintext
# Run Our basic api we created in main.py file
>> fastapi dev app/main.py
```

Now you will get something like this.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1728585381626/1dbcc84d-9f8c-4d7b-97f0-41837ab93e57.png align="center")

as I didn’t have the complete image of cli, but it should be like this. There is already the docs ui ready at url “http://127.0.0.1:8000/docs” and the our api is ready at “http://127.0.0.1:8000/”

» Now we have complete the basic tutorial of fastapi let’s move to next chapter.
