This is a simple public API that returns basic information in JSON format. It provides:
- A registered email address
- The current UTC datetime in ISO 8601 format
- A GitHub repository URL containing the project code
- Additional system metadata
This project is implemented using Python (Flask).
- Lightweight & Fast: Minimal response time (<500ms)
- CORS Enabled: Allows cross-origin requests
- Public Endpoint: Accessible to anyone
- Dynamically Generated DateTime: Always returns the latest UTC timestamp
basic-public-api/
│── python-api/ # Python implementation
│ ├── app.py
│ ├── requirements.txt
│ ├── Procfile
│ ├── .gitignore
│── README.md
git clone https://github.com/CynthiaWahome/basic-public-api.git
cd basic-public-api/python-api/app.py
python -m venv venv
Activate the virtual environment:
- Windows:
venv\Scripts\activate
- Mac/Linux:
source venv/bin/activate
pip install -r requirements.txt
python app.py
The API will be accessible at:
➡ http://127.0.0.1:5000/
Returns the required JSON response.
{
"email": "your-email@example.com",
"current_datetime": "2025-01-30T09:30:00Z",
"github_url": "https://github.com/yourusername/your-repo",
"track": "Backend",
"message": "Do it alone, do it broke, do it scared...JUST DO IT ✔ 🔥",
"server_info": {
"os": "Linux",
"python_version": "3.10.12",
"client_ip": "123.45.67.89"
}
}
The API is deployed to a publicly accessible endpoint.
https://basic-public-api-d1f963692f67.herokuapp.com/
This project is open-source and available under the MIT License.