https://github.com/codegeek004/api-in-flask
https://github.com/codegeek004/api-in-flask
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codegeek004/api-in-flask
- Owner: codegeek004
- Created: 2025-01-10T08:53:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-10T11:05:18.000Z (over 1 year ago)
- Last Synced: 2025-01-17T19:36:56.096Z (over 1 year ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.