Fish Info
This module provides routes and functions for retrieving detailed fish information from a JSON data source.
get_fish_info(fish_name)
Retrieve information about a specific fish by its name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fish_name
|
str
|
The name of the fish to retrieve information for. |
required |
Returns:
| Type | Description |
|---|---|
Response
|
A JSON response containing fish details if found, otherwise a 404 error with an error message. |
Source code in src/routes/fish_info.py
fish_info_route(app)
Register the fish information retrieval route with the Flask app.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Flask
|
The Flask application instance. |
required |
Returns:
| Type | Description |
|---|---|
None
|
This just registers the /fish-info route. |