From 81657b185dc5ccb2a806bab97e7fb53abc9726b2 Mon Sep 17 00:00:00 2001 From: Justin Myers Date: Fri, 23 Feb 2024 10:41:19 -0800 Subject: [PATCH] Change appw to password in examples --- examples/esp32spi/requests_esp32spi_advanced.py | 4 ++-- examples/esp32spi/requests_esp32spi_simpletest.py | 4 ++-- .../expanded/requests_wifi_adafruit_discord_active_online.py | 4 ++-- examples/wifi/expanded/requests_wifi_api_discord.py | 4 ++-- examples/wifi/expanded/requests_wifi_api_fitbit.py | 4 ++-- examples/wifi/expanded/requests_wifi_api_github.py | 4 ++-- examples/wifi/expanded/requests_wifi_api_mastodon.py | 4 ++-- .../wifi/expanded/requests_wifi_api_openskynetwork_private.py | 4 ++-- .../expanded/requests_wifi_api_openskynetwork_private_area.py | 4 ++-- .../wifi/expanded/requests_wifi_api_openskynetwork_public.py | 4 ++-- examples/wifi/expanded/requests_wifi_api_steam.py | 4 ++-- examples/wifi/expanded/requests_wifi_api_twitch.py | 4 ++-- examples/wifi/expanded/requests_wifi_api_twitter.py | 4 ++-- examples/wifi/expanded/requests_wifi_api_youtube.py | 4 ++-- examples/wifi/expanded/requests_wifi_multiple_cookies.py | 4 ++-- examples/wifi/requests_wifi_advanced.py | 4 ++-- examples/wifi/requests_wifi_simpletest.py | 4 ++-- 17 files changed, 34 insertions(+), 34 deletions(-) diff --git a/examples/esp32spi/requests_esp32spi_advanced.py b/examples/esp32spi/requests_esp32spi_advanced.py index 4e5a15e..3b0bb41 100644 --- a/examples/esp32spi/requests_esp32spi_advanced.py +++ b/examples/esp32spi/requests_esp32spi_advanced.py @@ -14,7 +14,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") # If you are using a board with pre-defined ESP32 Pins: esp32_cs = DigitalInOut(board.ESP_CS) @@ -37,7 +37,7 @@ print("Connecting to AP...") while not radio.is_connected: try: - radio.connect_AP(ssid, appw) + radio.connect_AP(ssid, password) except RuntimeError as e: print("could not connect to AP, retrying: ", e) continue diff --git a/examples/esp32spi/requests_esp32spi_simpletest.py b/examples/esp32spi/requests_esp32spi_simpletest.py index 8c72797..01d8204 100644 --- a/examples/esp32spi/requests_esp32spi_simpletest.py +++ b/examples/esp32spi/requests_esp32spi_simpletest.py @@ -14,7 +14,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") # If you are using a board with pre-defined ESP32 Pins: esp32_cs = DigitalInOut(board.ESP_CS) @@ -37,7 +37,7 @@ print("Connecting to AP...") while not radio.is_connected: try: - radio.connect_AP(ssid, appw) + radio.connect_AP(ssid, password) except RuntimeError as e: print("could not connect to AP, retrying: ", e) continue diff --git a/examples/wifi/expanded/requests_wifi_adafruit_discord_active_online.py b/examples/wifi/expanded/requests_wifi_adafruit_discord_active_online.py index 9262e51..d43f73f 100644 --- a/examples/wifi/expanded/requests_wifi_adafruit_discord_active_online.py +++ b/examples/wifi/expanded/requests_wifi_adafruit_discord_active_online.py @@ -28,7 +28,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") # Converts seconds to minutes/hours/days @@ -58,7 +58,7 @@ def time_calc(input_time): requests = adafruit_requests.Session(pool, ssl.create_default_context()) while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("Connection Error:", e) print("Retrying in 10 seconds") diff --git a/examples/wifi/expanded/requests_wifi_api_discord.py b/examples/wifi/expanded/requests_wifi_api_discord.py index 0202fc0..91b2b6c 100644 --- a/examples/wifi/expanded/requests_wifi_api_discord.py +++ b/examples/wifi/expanded/requests_wifi_api_discord.py @@ -21,7 +21,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") Discord_Auth = os.getenv("Discord_Authorization") # Initialize WiFi Pool (There can be only 1 pool & top of script) @@ -62,7 +62,7 @@ def time_calc(input_time): # input_time in seconds requests = adafruit_requests.Session(pool, ssl.create_default_context()) while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("Connection Error:", e) print("Retrying in 10 seconds") diff --git a/examples/wifi/expanded/requests_wifi_api_fitbit.py b/examples/wifi/expanded/requests_wifi_api_fitbit.py index 9eba799..022ee22 100644 --- a/examples/wifi/expanded/requests_wifi_api_fitbit.py +++ b/examples/wifi/expanded/requests_wifi_api_fitbit.py @@ -38,7 +38,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") Fitbit_ClientID = os.getenv("Fitbit_ClientID") Fitbit_Token = os.getenv("Fitbit_Token") @@ -79,7 +79,7 @@ def time_calc(input_time): requests = adafruit_requests.Session(pool, ssl.create_default_context()) while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("Connection Error:", e) print("Retrying in 10 seconds") diff --git a/examples/wifi/expanded/requests_wifi_api_github.py b/examples/wifi/expanded/requests_wifi_api_github.py index 1153e93..f1f86e3 100644 --- a/examples/wifi/expanded/requests_wifi_api_github.py +++ b/examples/wifi/expanded/requests_wifi_api_github.py @@ -22,7 +22,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") # Github developer token required. github_username = os.getenv("Github_username") github_token = os.getenv("Github_token") @@ -49,7 +49,7 @@ requests = adafruit_requests.Session(pool, ssl.create_default_context()) while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("Connection Error:", e) print("Retrying in 10 seconds") diff --git a/examples/wifi/expanded/requests_wifi_api_mastodon.py b/examples/wifi/expanded/requests_wifi_api_mastodon.py index 4136491..56f3e8d 100644 --- a/examples/wifi/expanded/requests_wifi_api_mastodon.py +++ b/examples/wifi/expanded/requests_wifi_api_mastodon.py @@ -32,7 +32,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") # Converts seconds in minutes/hours/days @@ -70,7 +70,7 @@ def time_calc(input_time): requests = adafruit_requests.Session(pool, ssl.create_default_context()) while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("Connection Error:", e) print("Retrying in 10 seconds") diff --git a/examples/wifi/expanded/requests_wifi_api_openskynetwork_private.py b/examples/wifi/expanded/requests_wifi_api_openskynetwork_private.py index ebdd420..486a4de 100644 --- a/examples/wifi/expanded/requests_wifi_api_openskynetwork_private.py +++ b/examples/wifi/expanded/requests_wifi_api_openskynetwork_private.py @@ -32,7 +32,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") osnu = os.getenv("OSN_Username") osnp = os.getenv("OSN_Password") @@ -92,7 +92,7 @@ def _format_datetime(datetime): request = adafruit_requests.Session(pool, ssl.create_default_context()) while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("Connection Error:", e) print("Retrying in 10 seconds") diff --git a/examples/wifi/expanded/requests_wifi_api_openskynetwork_private_area.py b/examples/wifi/expanded/requests_wifi_api_openskynetwork_private_area.py index 79a07df..8cd08a2 100644 --- a/examples/wifi/expanded/requests_wifi_api_openskynetwork_private_area.py +++ b/examples/wifi/expanded/requests_wifi_api_openskynetwork_private_area.py @@ -34,7 +34,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") # No token required, only website login osnu = os.getenv("OSN_Username") osnp = os.getenv("OSN_Password") @@ -107,7 +107,7 @@ def _format_datetime(datetime): request = adafruit_requests.Session(pool, ssl.create_default_context()) while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("Connection Error:", e) print("Retrying in 10 seconds") diff --git a/examples/wifi/expanded/requests_wifi_api_openskynetwork_public.py b/examples/wifi/expanded/requests_wifi_api_openskynetwork_public.py index ec0486a..5bcd69b 100644 --- a/examples/wifi/expanded/requests_wifi_api_openskynetwork_public.py +++ b/examples/wifi/expanded/requests_wifi_api_openskynetwork_public.py @@ -30,7 +30,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") # Requests URL - icao24 is their endpoint required for a transponder # example https://opensky-network.org/api/states/all?icao24=a808c5 @@ -71,7 +71,7 @@ def _format_datetime(datetime): requests = adafruit_requests.Session(pool, ssl.create_default_context()) while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("Connection Error:", e) print("Retrying in 10 seconds") diff --git a/examples/wifi/expanded/requests_wifi_api_steam.py b/examples/wifi/expanded/requests_wifi_api_steam.py index bffda83..208b6d6 100644 --- a/examples/wifi/expanded/requests_wifi_api_steam.py +++ b/examples/wifi/expanded/requests_wifi_api_steam.py @@ -20,7 +20,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") # Requires Steam Developer API key steam_usernumber = os.getenv("steam_id") steam_apikey = os.getenv("steam_api_key") @@ -64,7 +64,7 @@ requests = adafruit_requests.Session(pool, ssl.create_default_context()) while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("Connection Error:", e) print("Retrying in 10 seconds") diff --git a/examples/wifi/expanded/requests_wifi_api_twitch.py b/examples/wifi/expanded/requests_wifi_api_twitch.py index f637591..716caa9 100644 --- a/examples/wifi/expanded/requests_wifi_api_twitch.py +++ b/examples/wifi/expanded/requests_wifi_api_twitch.py @@ -25,7 +25,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") twitch_client_id = os.getenv("Twitch_ClientID") twitch_client_secret = os.getenv("Twitch_Client_Secret") # For finding your Twitch User ID @@ -59,7 +59,7 @@ def time_calc(input_time): requests = adafruit_requests.Session(pool, ssl.create_default_context()) while not wifi.radio.connected: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("Connection Error:", e) print("Retrying in 10 seconds") diff --git a/examples/wifi/expanded/requests_wifi_api_twitter.py b/examples/wifi/expanded/requests_wifi_api_twitter.py index 1c4dc3b..4dcdfa6 100644 --- a/examples/wifi/expanded/requests_wifi_api_twitter.py +++ b/examples/wifi/expanded/requests_wifi_api_twitter.py @@ -27,7 +27,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") tw_userid = os.getenv("TW_userid") tw_bearer_token = os.getenv("TW_bearer_token") @@ -60,7 +60,7 @@ requests = adafruit_requests.Session(pool, ssl.create_default_context()) while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("Connection Error:", e) print("Retrying in 10 seconds") diff --git a/examples/wifi/expanded/requests_wifi_api_youtube.py b/examples/wifi/expanded/requests_wifi_api_youtube.py index fb539ff..e9bc6a2 100644 --- a/examples/wifi/expanded/requests_wifi_api_youtube.py +++ b/examples/wifi/expanded/requests_wifi_api_youtube.py @@ -26,7 +26,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") yt_username = os.getenv("YT_username") yt_token = os.getenv("YT_token") @@ -60,7 +60,7 @@ requests = adafruit_requests.Session(pool, ssl.create_default_context()) while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("Connection Error:", e) print("Retrying in 10 seconds") diff --git a/examples/wifi/expanded/requests_wifi_multiple_cookies.py b/examples/wifi/expanded/requests_wifi_multiple_cookies.py index 9e3fcf5..36e4616 100644 --- a/examples/wifi/expanded/requests_wifi_multiple_cookies.py +++ b/examples/wifi/expanded/requests_wifi_multiple_cookies.py @@ -18,11 +18,11 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") # Connect to the Wi-Fi network print("Connecting to %s" % ssid) -wifi.radio.connect(ssid, appw) +wifi.radio.connect(ssid, password) # Set up the requests library pool = socketpool.SocketPool(wifi.radio) diff --git a/examples/wifi/requests_wifi_advanced.py b/examples/wifi/requests_wifi_advanced.py index e6985a4..3bb0976 100644 --- a/examples/wifi/requests_wifi_advanced.py +++ b/examples/wifi/requests_wifi_advanced.py @@ -11,7 +11,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") # Initialize WiFi Pool (There can be only 1 pool & top of script) radio = wifi.radio @@ -20,7 +20,7 @@ print("Connecting to AP...") while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("could not connect to AP, retrying: ", e) print("Connected to", str(radio.ap_info.ssid, "utf-8"), "\tRSSI:", radio.ap_info.rssi) diff --git a/examples/wifi/requests_wifi_simpletest.py b/examples/wifi/requests_wifi_simpletest.py index 033b2db..35b835a 100644 --- a/examples/wifi/requests_wifi_simpletest.py +++ b/examples/wifi/requests_wifi_simpletest.py @@ -11,7 +11,7 @@ # Get WiFi details, ensure these are setup in settings.toml ssid = os.getenv("CIRCUITPY_WIFI_SSID") -appw = os.getenv("CIRCUITPY_WIFI_PASSWORD") +password = os.getenv("CIRCUITPY_WIFI_PASSWORD") # Initialize WiFi Pool (There can be only 1 pool & top of script) radio = wifi.radio @@ -20,7 +20,7 @@ print("Connecting to AP...") while not wifi.radio.ipv4_address: try: - wifi.radio.connect(ssid, appw) + wifi.radio.connect(ssid, password) except ConnectionError as e: print("could not connect to AP, retrying: ", e) print("Connected to", str(radio.ap_info.ssid, "utf-8"), "\tRSSI:", radio.ap_info.rssi)