-
Notifications
You must be signed in to change notification settings - Fork 1
Animal
The animal category provides classes and functions for working with various animals, such as cats, dogs, red pandas etc. These tools can be used to retrieve information about animals and perform tasks like saving images of animals. The documentation for this category includes information about each animal class and function, including their parameters, return values, and any exceptions they may raise. By using these tools, you can easily incorporate information and images of animals into your Python projects.
Returns an image link and a fact about a bird.
- image_link (str): The image link of the bird.
- fact (str): A fact about the bird.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the bird image.
- name (str, optional): Image name/path. Defaults to "bird.png".
- bool: Returns True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageRetrieveError: Raised when the image fails to load.
- ImageNotFound: Raised when the image fails to save.
from sra import animal
# Create a new instance of the Bird class
bird = animal.Bird()
# Get the image link and fact about the bird
image_link = bird.image_link
fact = bird.fact
# Save the bird image
bird.save_image("my_bird.png")
Returns an image link and a fact about a cat.
- image_link (str): The image link of the cat.
- fact (str): A fact about the cat.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the cat image.
- name (str, optional): The image name/path. Defaults to "cat.png".
- bool: True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageRetrieveError: Raised when the image fails to load.
- ImageNotFound: Raised when the image fails to save.
from sra import animal
# Create a new instance of the Cat class
cat = animal.Cat()
# Get the image link and fact about the cat
image_link = cat.image_link
fact = cat.fact
# Save the cat image
cat.save_image("my_cat.png")
Returns an image link and a fact about a dog.
- image_link (str): The image link of the dog.
- fact (str): A fact about the dog.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the dog image.
- name (str, optional): The image name/path. Defaults to "dog.png".
- bool: True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageRetrieveError: Raised when the image fails to load.
- ImageNotFound: Raised when the image fails to save.
from sra import animal
# Create a new instance of the Dog class
dog = animal.Dog()
# Get the image link and fact about the dog
image_link = dog.image_link
fact = dog.fact
# Save the dog image
dog.save_image("my_dog.png")
Returns an image link and a fact about a fox.
- image_link (str): The image link of the fox.
- fact (str): A fact about the fox.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the fox image.
- name (str, optional): The image name/path. Defaults to "fox.png".
- bool: True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageRetrieveError: Raised when the image fails to load.
- ImageNotFound: Raised when the image fails to save.
from sra import animal
# Create a new instance of the Fox class
fox = animal.Fox()
# Get the image link and fact about the fox
image_link = fox.image_link
fact = fox.fact
# Save the fox image
fox.save_image("my_fox.png")
Returns an image link and a fact about a kangaroo.
- image_link (str): The image link of the kangaroo.
- fact (str): A fact about the kangaroo.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the kangaroo image.
- name (str, optional): The image name/path. Defaults to "kangaroo.png".
- bool: True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageRetrieveError: Raised when the image fails to load.
- ImageNotFound: Raised when the image fails to save.
from sra import animal
# Create a new instance of the Kangaroo class
kangaroo = animal.Kangaroo()
# Get the image link and fact about the kangaroo
image_link = kangaroo.image_link
fact = kangaroo.fact
# Save the kangaroo image
kangaroo.save_image("my_kangaroo.png")
Returns an image link and a fact about a koala.
- image_link (str): The image link of the koala.
- fact (str): A fact about the koala.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the koala image.
- name (str, optional): The image name/path. Defaults to "koala.png".
- bool: True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageRetrieveError: Raised when the image fails to load.
- ImageNotFound: Raised when the image fails to save.
from sra import animal
# Create a new instance of the Koala class
koala = animal.Koala()
# Get the image link and fact about the koala
image_link = koala.image_link
fact = koala.fact
# Save the koala image
koala.save_image("koala_image.png")
Returns an image link and a fact about a panda.
- image_link (str): The image link of the panda.
- fact (str): A fact about the panda.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the panda image.
- name (str, optional): The image name/path. Defaults to "panda.png".
- bool: True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageRetrieveError: Raised when the image fails to load.
- ImageNotFound: Raised when the image fails to save.
from sra import animal
# Create a new instance of the Panda class
panda = animal.Panda()
# Get the image link and fact about the panda
image_link = panda.image_link
fact = panda.fact
# Save the panda image
panda.save_image("panda_image.png")
Returns an image link and a fact about a raccoon.
- image_link (str): The image link of the raccoon.
- fact (str): A fact about the raccoon.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the raccoon image.
- name (str, optional): The image name/path. Defaults to "raccoon.png".
- bool: True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageRetrieveError: Raised when the image fails to load.
- ImageNotFound: Raised when the image fails to save.
from sra import animal
# Create a new instance of the Raccoon class
raccoon = animal.Raccoon()
# Get the image link and fact about the raccoon
image_link = raccoon.image_link
fact = raccoon.fact
# Save the raccoon image
raccoon.save_image("raccoon_image.png")
Returns an image link and a fact about a red panda.
- image_link (str): The image link of the red panda.
- fact (str): A fact about the red panda.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the red panda image.
- name (str, optional): The image name/path. Defaults to "red_panda.png".
- bool: True if the image was successfully saved.
- InvalidFileFormat: Raised when an unsupported file format is given.
- ImageRetrieveError: Raised when the image fails to load.
- ImageNotFound: Raised when the image fails to save.
from sra import animal
# Create a new instance of the RedPanda class
red_panda = animal.RedPanda()
# Get the image link and fact about the red panda
image_link = red_panda.image_link
fact = red_panda.fact
# Save the red panda image
red_panda.save_image("red_panda_image.png")
sra-pylib by Sayad Uddin Tahsin
-
Animal
-
Animu
-
Canvas
-
Facts
-
Image
-
Others
-
Pokemon
-
Chatbot
-
Welcome (Free)
- ImageNotFound
- InvalidFileFormat
- APITimeout
- APIError
- ImageRetrieveError
- InvalidAvatarURL
- InvalidImageURL
- InvalidHEXColor
- InvalidBrightnessPower
- InvalidRGBCode
- DisplayNameError
- UsernameError
- CommentError
- ThemeError
- InvalidTemplate
- InvalidBackground
- InvalidFont
- InvalidType
- InvalidTextColor
- ThresholdError