



from typing import Literal

UpperCAmelCase							=       """ABCDEFGHIJKLMNOPQRSTUVWXYZ"""

def       A_   (						__a  :					str			,		__a  :					str			,		__a  :					Literal["encrypt", "decrypt"]		):

				"""simple docstring"""
				a__					   =		LETTERS if mode == """decrypt""" else key
				a__					   =		key if mode == """decrypt""" else LETTERS
				a__					   =		""""""
				# loop through each symbol in the message
				for symbol in message:
								if symbol.upper() in chars_a:
												# encrypt/decrypt the symbol
												a__					   =		chars_a.find(symbol.upper()		)
												if symbol.isupper():
																translated += chars_b[sym_index].upper()
												else:
																translated += chars_b[sym_index].lower()
								else:
												# symbol is not in LETTERS, just add it
												translated += symbol
				return translated

def       A_   (						__a  :					str			,		__a  :					str		):

				"""simple docstring"""
				return translate_message(__a			,		__a			,		"""encrypt"""		)

def       A_   (						__a  :					str			,		__a  :					str		):

				"""simple docstring"""
				return translate_message(__a			,		__a			,		"""decrypt"""		)

def       A_   (						):

				"""simple docstring"""
				a__					   =		"""Hello World"""
				a__					   =		"""QWERTYUIOPASDFGHJKLZXCVBNM"""
				a__					   =		"""decrypt"""  # set to 'encrypt' or 'decrypt'

				if mode == "encrypt":
								a__					   =		encrypt_message(__a			,		__a		)
				elif mode == "decrypt":
								a__					   =		decrypt_message(__a			,		__a		)
				print(F'''Using the key {key}, the {mode}ed message is: {translated}'''		)


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	main()






"""simple docstring"""


import shutil

import requests

def 					_lowerCAmelCase (  lowercase_						,      lowercase_ = False						,      lowercase_ = "."		):
						UpperCAmelCase			 =					'https://api.nasa.gov/planetary/apod'
						return requests.get(lowercase_						,      params={'api_key': api_key}		).json()

def 					_lowerCAmelCase (  lowercase_						,      lowercase_ = "."		):
						UpperCAmelCase			 =					get_apod_data(lowercase_		)
						UpperCAmelCase			 =					apod_data['url']
						UpperCAmelCase			 =					img_url.split('/'		)[-1]
						UpperCAmelCase			 =					requests.get(lowercase_						,      stream=lowercase_		)

						with open(F"""{path}/{img_name}"""						,      'wb+'		) as img_file:
												shutil.copyfileobj(response.raw						,      lowercase_		)
						del response
						return apod_data

def 					_lowerCAmelCase (  lowercase_		):
						UpperCAmelCase			 =					'https://images-api.nasa.gov/search'
						return requests.get(lowercase_						,      params={'q': query}		).json()


if __name__ == "__main__":
				print(save_apod("""YOUR API KEY"""))
				snake_case_								=			get_archive_data("""apollo 2011""")["""collection"""]["""items"""]
				print(apollo_aaaa_items[0]["""data"""][0]["""description"""])





