Welcome to the Don Bosco School API! This API provides various endpoints to fetch information from the Don Bosco School website, including birthdays, notices, competition results, house points, event links, and event images.
The Don Bosco School API allows you to fetch various types of information from the Don Bosco School website. This API is built using Flask and BeautifulSoup to scrape and serve the data in a structured format.
To install and run the API locally, follow these steps:
-
Clone the repository:
git clone https://github.com/SwastikBhattacharjee/dbs-api.git cd dbs-api -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the Flask application:
flask run
The API will be available at http://127.0.0.1:5000.
You can use tools like curl, Postman, or your web browser to interact with the API endpoints. Below are the available endpoints and their usage.
Endpoint: /
Method: GET
Description: Returns a welcome message and metadata about the API.
Example:
curl http://127.0.0.1:5000/Endpoint: /birthdays
Method: GET
Description: Fetches and returns the list of student birthdays.
Query Parameters:
tuple(optional): Whether to return the data in tuple format or as formatted strings. Default istrue.
Example:
curl http://127.0.0.1:5000/birthdaysEndpoint: /notices
Method: GET
Description: Fetches and returns the list of notices.
Example:
curl http://127.0.0.1:5000/noticesEndpoint: /competitionResults
Method: GET
Description: Fetches and returns the list of competition results.
Example:
curl http://127.0.0.1:5000/competitionResultsEndpoint: /housePoints
Method: GET
Description: Fetches and returns the house points.
Example:
curl http://127.0.0.1:5000/housePointsEndpoint: /eventLinks
Method: GET
Description: Fetches and returns the list of event links and their titles.
Example:
curl http://127.0.0.1:5000/eventLinksEndpoint: /eventImages
Method: GET
Description: Fetches and returns the list of event images from the provided URL.
Query Parameters:
url(required): The URL to fetch event images from.
Example:
curl "http://127.0.0.1:5000/eventImages?url=http://donboscoberhampore.in/events.aspx"This API was created by Swastik Bhattacharjee. Swastik is a passionate developer with a keen interest in web scraping and API development. You can find more about Swastik on GitHub.
This API uses data from the Don Bosco School website. All data and content belong to their respective owners. This API is intended for educational and informational purposes only. The author is not affiliated with Don Bosco School and does not claim any ownership of the data provided by the website.
Feel free to contribute to this project by submitting issues or pull requests. Happy coding! 🚀