





'''simple docstring'''






from typing import Optional
from urllib.parse import quote

import huggingface_hub as hfh
from packaging import version
def 							_lowerCamelCase(  UpperCamelCase__    : str    ,       UpperCamelCase__    : str    ,       UpperCamelCase__    : Optional[str] = None		)		->  str:
    if version.parse(hfh.__version__		).release < version.parse('''0.11.0'''		).release:
        # old versions of hfh don't url-encode the file path
        A       :       List[str]							=						quote(UpperCamelCase__		)
    return hfh.hf_hub_url(UpperCamelCase__    ,       UpperCamelCase__    ,       repo_type='''dataset'''    ,       revision=UpperCamelCase__		)







'''simple docstring'''






import requests

snake_case_     =	"""YOUR API KEY"""
def 							_lowerCamelCase(  UpperCamelCase__    : str    ,       UpperCamelCase__    : str = giphy_api_key		)		->  list:
    A       :       Optional[Any]							=						'''+'''.join(query.split()		)
    A       :       List[Any]							=						F'''https://api.giphy.com/v1/gifs/search?q={formatted_query}&api_key={api_key}'''
    A       :       int							=						requests.get(UpperCamelCase__		).json()['''data''']
    return [gif["url"] for gif in gifs]


if __name__ == "__main__":
     print("""\n""".join(get_gifs("""space ship""")))
