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

https://github.com/codegeek004/api-in-flask


https://github.com/codegeek004/api-in-flask

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

# Flask API Example

This project demonstrates how to build and interact with an API in Flask using the Python `requests` library.

## Requirements

- Python 3.9
- Flask
- requests

## Installation

1. **Clone the repository**

```bash
git clone https://github.com/codegeek004/API-in-Flask
cd API-in-Flask

```

2. **Create a virtual environment and activate it**

```bash
python3 -m venv venv
source venv/bin/activate # On Windows, use venv\Scripts\activate

```

3. **Install the dependencies**

```bash
pip install -r requirements.txt

```

## Running the Flask Server

```bash
python app.py

```

By default, the Flask server will start at `http://127.0.0.1:5000`.

### Note

- Replace `'127.0.0.1:8000'` with your actual API URL.
- Ensure the server is running before sending requests.