



"""simple docstring"""




from abc import ABC, abstractmethod
from typing import Optional, Union

from .. import Dataset, DatasetDict, Features, IterableDataset, IterableDatasetDict, NamedSplit
from ..utils.typing import NestedDataStructureLike, PathLike






class       UpperCAmelCase_    (							_UpperCamelCase		):



      def __init__(	self	:      Any	,      A	:      Optional[NestedDataStructureLike[PathLike]] = None	,      A	:      Optional[NamedSplit] = None	,      A	:      Optional[Features] = None	,      A	:      str = None	,      A	:      bool = False	,      A	:      bool = False	,      A	:      Optional[int] = None	,      **A	:      Tuple	,      ):
           _UpperCAmelCase     :      Union[str, Any]														=       path_or_paths
           _UpperCAmelCase     :      Optional[Any]														=       split if split or isinstance(A	,      A		) else "train"
           _UpperCAmelCase     :      Any														=       features
           _UpperCAmelCase     :      List[Any]														=       cache_dir
           _UpperCAmelCase     :      str														=       keep_in_memory
           _UpperCAmelCase     :      Any														=       streaming
           _UpperCAmelCase     :      Optional[int]														=       num_proc
           _UpperCAmelCase     :      List[Any]														=       kwargs



      @abstractmethod
      def 		snake_case_   (	self	:      int		):
           pass







class       UpperCAmelCase_    (							_UpperCamelCase		):



      def __init__(	self	:      List[Any]	,      A	:      Optional[Features] = None	,      A	:      str = None	,      A	:      bool = False	,      A	:      bool = False	,      A	:      Optional[int] = None	,      **A	:      Tuple	,      ):
           _UpperCAmelCase     :      Optional[int]														=       features
           _UpperCAmelCase     :      List[Any]														=       cache_dir
           _UpperCAmelCase     :      Optional[int]														=       keep_in_memory
           _UpperCAmelCase     :      Tuple														=       streaming
           _UpperCAmelCase     :      Union[str, Any]														=       num_proc
           _UpperCAmelCase     :      Tuple														=       kwargs



      @abstractmethod
      def 		snake_case_   (	self	:      List[Any]		):
           pass





"""simple docstring"""




import requests

_lowerCAmelCase							:   List[Any]				=				"https://newsapi.org/v1/articles?source=bbc-news&sortBy=top&apiKey="

def 		__snake_case		( SCREAMING_SNAKE_CASE__      :		str							)    ->  None:





     '''simple docstring'''

     _UpperCAmelCase     :      List[str]														=       requests.get(_NEWS_API + bbc_news_api_key							).json()
     # each article in the list is a dict
     for i, article in enumerate(bbc_news_page["articles"]		,    1							):
          print(f'{i}.) {article["title"]}'							)


if __name__ == "__main__":
 fetch_bbc_news(bbc_news_api_key="<Your BBC News API key goes here>")
