A Python-based application that fetches animal data from an API and generates a static HTML page showcasing various animals.
- DATA Retrieval: Fetches animal data from a public API.
- HTML Generation: Creates a user-friendly HTML page displaying animal information.
- Template Usage: Utilizes an HTML template for consistent styling.
-
To install this project, Clone the Repository:
git clone https://github.com/shinegit1/Zootopia-with-API.gitcd Zootopia-with-API -
Create a Virtual Environment (Optional but Recommended):
python -m venv venvsource venv/bin/activate# On Windows: venv\Scripts\activate -
Install Dependencies:
pip install -r requirements.txt
-
To use this project, Run the following command:
python animals_web_generator.pyEx. Enter a name of animal: lion -
View the output:
Open the generated
animals.htmlfile in your web browser to see the list of animals.
Zootopia-with-API/
βββ animals_template.html # HTML template for the default page
βββ animals.html # HTML template for the ouput page
βββ animals_web_generator.py # Main script to fetch data and generate HTML
βββ data_fetcher.py # Module to handle API requests
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
- Python 3.x
- Requests library
- Python-dotenv
- Zoo Animal API for providing the animal data.
