https://github.com/bessouat40/python-fastapi-template
Example of FastAPI deployment and API calls
https://github.com/bessouat40/python-fastapi-template
api beginner beginner-friendly beginner-project fastapi python rest-api template template-project tutorial
Last synced: 6 months ago
JSON representation
Example of FastAPI deployment and API calls
- Host: GitHub
- URL: https://github.com/bessouat40/python-fastapi-template
- Owner: Bessouat40
- Created: 2023-02-15T18:24:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-15T18:45:01.000Z (about 3 years ago)
- Last Synced: 2025-01-17T01:48:54.254Z (about 1 year ago)
- Topics: api, beginner, beginner-friendly, beginner-project, fastapi, python, rest-api, template, template-project, tutorial
- Language: Python
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# FastAPI use
## FastAPI
It's a tool to build RestAPI with python. It's an easy library to deploy API for your webapp for example.
## Usage
* First you need to install python dependencies :
```bash
python -m pip install -r requirements.txt
```
* Then you need to run your API :
```bash
python main.py
```
Now your API is running at `http://localhost:8000`.
If you want to test your API, you can run call.py :
```bash
python call.py
```
## API calls
If you want to access this API :
```python
import requests
data = {'number' : 1}
response = requests.post('http://localhost:8000/soustraction', data = data)
```