An open API service indexing awesome lists of open source software.

https://github.com/andriikot/bookstore--fastapi

Bookstore (FastAPI)
https://github.com/andriikot/bookstore--fastapi

fastapi json python3 rest-api

Last synced: about 2 months ago
JSON representation

Bookstore (FastAPI)

Awesome Lists containing this project

README

          

# FastAPI

## Simple Application (REST API)

### Bookstore

#### Technologies:



FastAPI
Python
Pydantic






FastAPI




Python




Pydantic



#### Installation

##### 1. Clone this repository:

```bash
git clone https://github.com/yourusername/your-repo-name.git
cd your-repo-name
```

##### 2. Create a virtual environment (optional but recommended):

```bash
python -m venv venv
venv\Scripts\activate.bat # On Windows
source myenv/bin/activate # On Linux
```

##### 3. Install the required packages using pip (or other package manager):

```bash
pip install fastapi uvicorn
```

##### 4. Run the FastAPI application:

```bash
python main.py --port
```

Where `` is an integer representing the port on which the application will run. For example, to start the application on port 8080, execute the command:

```bash
python main.py --port 8080
```

If the `--port` parameter is not specified, the application will default to running on port 8000.

Once the application is running, you can open your browser and navigate to the following address:

- For port 8000:
- http://localhost:8000
- http://127.0.0.1:8000

If you specified a different port, for example, 8080, you would use:

- http://localhost:8080
- http://127.0.0.1:8080

**Note:**
`localhost` and `127.0.0.1` are synonyms that refer to your local computer. You can use either of these addresses to access your application.

This instruction will help users of your application understand how to run it and which addresses to use in the browser.