An Api in python with flask framework - menaaz project assistance
Welcome to the Flask API Integration project! This simple Flask application taught by Shreya Malogi demonstrates basic API integration using the Flask framework.
Flask
, Python
Flask API Integration is a beginner-friendly project showcasing API integration using the Flask framework. The application provides two endpoints: the home page and a user-specific page. Each endpoint returns a JSON response indicating the successful loading of the respective page.
Install Flask:
pip install flask
Run the application:
python <filename>.py
Replace <filename>
with the name of your Python file.
Home Page: Access the home page at http://localhost:2000/
to receive a JSON response indicating the successful loading of the home page.
User Request: Access the user page at http://localhost:2000/user/?user=<username>
to receive a JSON response indicating the successful loading of a user-specific page. Replace <username>
with the desired username.
Home Page:
http://localhost:2000/
GET
{
"page": "Home",
"Message": "successfully loaded the home page",
"Timestamp": <current_timestamp>
}
User Request:
http://localhost:2000/user/?user=<username>
GET
user
: The username for which the request is made.{
"page": "request",
"Message": "successfully loaded the request for <username> pages",
"Timestamp": <current_timestamp>
}
Contributions are welcome! If you find any issues or have suggestions, feel free to create a pull request or open an issue.
This project is licensed under the MIT License - see the LICENSE file for details.
2022 Shreya Malogi
Happy Coding!