diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bfe33abc..eaa05176 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,8 +68,7 @@ import planet # If you are not already logged in, this will prompt you to open a web browser to log in. auth = planet.Auth.from_profile('planet-user', save_state_to_storage=True) -if not auth.is_initialized(): - auth.user_login(allow_open_browser=False, allow_tty_prompt=True) +auth.ensure_initialized(allow_open_browser=False, allow_tty_prompt=True) session = planet.Session(auth) pl = planet.Planet(session) diff --git a/jupyter-notebooks/api_guides/data_api/planet_python_client_introduction.ipynb b/jupyter-notebooks/api_guides/data_api/planet_python_client_introduction.ipynb index bc8cc357..45506353 100644 --- a/jupyter-notebooks/api_guides/data_api/planet_python_client_introduction.ipynb +++ b/jupyter-notebooks/api_guides/data_api/planet_python_client_introduction.ipynb @@ -102,8 +102,7 @@ "# If you are not already logged in, this will prompt you to open a web browser to log in.\n", "\n", "auth = Auth.from_profile('planet-user', save_state_to_storage=True)\n", - "if not auth.is_initialized():\n", - " auth.user_login(allow_open_browser=False, allow_tty_prompt=True)\n", + "auth.ensure_initialized(allow_open_browser=False, allow_tty_prompt=True)\n", "\n", "session = Session(auth)\n", "pl = Planet(session)" @@ -290,9 +289,9 @@ "data": { "text/plain": [ "{'__daily_email_enabled': False,\n", - " '_links': {'_self': 'https://api.planet.com/data/v1/searches/83bea55b4bed4afd89c6254942a51212',\n", - " 'results': 'https://api.planet.com/data/v1/searches/83bea55b4bed4afd89c6254942a51212/results'},\n", - " 'created': '2025-10-02T17:22:30.520571Z',\n", + " '_links': {'_self': 'https://api.planet.com/data/v1/searches/9a898d5bfef74c0e93906ab99c19e2a5',\n", + " 'results': 'https://api.planet.com/data/v1/searches/9a898d5bfef74c0e93906ab99c19e2a5/results'},\n", + " 'created': '2025-10-29T21:27:24.906026Z',\n", " 'filter': {'config': [{'config': {'coordinates': [[[-122.47455596923828,\n", " 37.810326435534755],\n", " [-122.49172210693358, 37.795406713958236],\n", @@ -320,12 +319,12 @@ " 'field_name': 'cloud_cover',\n", " 'type': 'RangeFilter'}],\n", " 'type': 'AndFilter'},\n", - " 'id': '83bea55b4bed4afd89c6254942a51212',\n", + " 'id': '9a898d5bfef74c0e93906ab99c19e2a5',\n", " 'item_types': ['PSScene'],\n", " 'last_executed': None,\n", " 'name': 'planet_sdk_demo',\n", " 'search_type': 'saved',\n", - " 'updated': '2025-10-02T17:22:30.520571Z'}" + " 'updated': '2025-10-29T21:27:24.906026Z'}" ] }, "execution_count": 8, @@ -379,6 +378,42 @@ "name": "stdout", "output_type": "stream", "text": [ + "20251028_192515_32_24dc PSScene\n", + "20251028_193853_99_24d3 PSScene\n", + "20251028_193855_99_24d3 PSScene\n", + "20251027_192345_89_252b PSScene\n", + "20251027_192343_59_252b PSScene\n", + "20251021_192241_94_2546 PSScene\n", + "20251020_192339_04_2541 PSScene\n", + "20251020_192336_72_2541 PSScene\n", + "20251017_192356_05_250e PSScene\n", + "20251017_192353_88_250e PSScene\n", + "20251017_192217_37_250b PSScene\n", + "20251017_192219_55_250b PSScene\n", + "20251016_193446_16_24f6 PSScene\n", + "20251016_193448_23_24f6 PSScene\n", + "20251012_192305_82_2549 PSScene\n", + "20251012_192303_51_2549 PSScene\n", + "20251012_192524_21_251e PSScene\n", + "20251012_192521_91_251e PSScene\n", + "20251010_192423_53_2508 PSScene\n", + "20251010_192427_80_2508 PSScene\n", + "20251010_192425_67_2508 PSScene\n", + "20251007_192406_92_24b8 PSScene\n", + "20251007_192409_23_24b8 PSScene\n", + "20251006_192656_13_253d PSScene\n", + "20251006_192224_45_250a PSScene\n", + "20251006_192347_92_24dc PSScene\n", + "20251006_192345_76_24dc PSScene\n", + "20251006_192812_70_252d PSScene\n", + "20251006_192810_38_252d PSScene\n", + "20251005_192225_17_24fe PSScene\n", + "20251005_192227_47_24fe PSScene\n", + "20251004_193524_57_24f4 PSScene\n", + "20251004_193522_49_24f4 PSScene\n", + "20251004_192542_54_2518 PSScene\n", + "20251004_192538_27_2518 PSScene\n", + "20251004_192540_40_2518 PSScene\n", "20250927_192606_07_253d PSScene\n", "20250926_192540_31_2527 PSScene\n", "20250926_192538_01_2527 PSScene\n", @@ -392,43 +427,7 @@ "20250919_191700_97_250a PSScene\n", "20250917_192935_26_24df PSScene\n", "20250917_192200_03_24d1 PSScene\n", - "20250916_191655_04_2515 PSScene\n", - "20250914_192352_64_24de PSScene\n", - "20250907_192420_83_24e5 PSScene\n", - "20250907_192236_33_254a PSScene\n", - "20250907_192238_65_254a PSScene\n", - "20250906_193017_20_24fb PSScene\n", - "20250906_193015_12_24fb PSScene\n", - "20250902_192247_46_252b PSScene\n", - "20250831_192025_20_24dc PSScene\n", - "20250831_192027_39_24dc PSScene\n", - "20250830_192421_93_2526 PSScene\n", - "20250830_192547_51_2530 PSScene\n", - "20250829_192734_79_24df PSScene\n", - "20250829_192216_98_2527 PSScene\n", - "20250829_192736_86_24df PSScene\n", - "20250829_192646_07_24ed PSScene\n", - "20250829_192648_13_24ed PSScene\n", - "20250828_192712_72_252b PSScene\n", - "20250828_192710_39_252b PSScene\n", - "20250826_192344_61_2540 PSScene\n", - "20250826_192342_30_2540 PSScene\n", - "20250825_192223_41_24ae PSScene\n", - "20250825_192225_60_24ae PSScene\n", - "20250821_191907_17_250e PSScene\n", - "20250821_191904_96_250e PSScene\n", - "20250821_191623_58_251d PSScene\n", - "20250821_192614_79_24d7 PSScene\n", - "20250821_192616_87_24d7 PSScene\n", - "20250820_192131_99_2532 PSScene\n", - "20250820_192129_64_2532 PSScene\n", - "20250819_192151_56_253f PSScene\n", - "20250819_192153_90_253f PSScene\n", - "20250818_192353_06_253c PSScene\n", - "20250818_192428_01_24fe PSScene\n", - "20250818_192430_36_24fe PSScene\n", - "20250815_191855_97_251f PSScene\n", - "20250815_192806_32_24fb PSScene\n" + "20250916_191655_04_2515 PSScene\n" ] } ], @@ -475,33 +474,33 @@ { "data": { "text/plain": [ - "{'acquired': '2025-09-27T19:26:06.070563Z',\n", + "{'acquired': '2025-10-28T19:25:15.324109Z',\n", " 'anomalous_pixels': 0,\n", - " 'clear_confidence_percent': 94,\n", + " 'clear_confidence_percent': 93,\n", " 'clear_percent': 99,\n", " 'cloud_cover': 0,\n", " 'cloud_percent': 0,\n", " 'ground_control': True,\n", - " 'gsd': 3.8,\n", + " 'gsd': 3.6,\n", " 'heavy_haze_percent': 0,\n", " 'instrument': 'PSB.SD',\n", " 'item_type': 'PSScene',\n", " 'light_haze_percent': 0,\n", " 'pixel_resolution': 3,\n", " 'provider': 'planetscope',\n", - " 'published': '2025-09-28T04:26:12Z',\n", + " 'published': '2025-10-29T02:12:59Z',\n", " 'publishing_stage': 'finalized',\n", " 'quality_category': 'test',\n", - " 'satellite_azimuth': 277.7,\n", - " 'satellite_id': '253d',\n", + " 'satellite_azimuth': 277.9,\n", + " 'satellite_id': '24dc',\n", " 'shadow_percent': 0,\n", " 'snow_ice_percent': 1,\n", - " 'strip_id': '8335954',\n", - " 'sun_azimuth': 166.4,\n", - " 'sun_elevation': 49.5,\n", - " 'updated': '2025-09-28T12:58:31Z',\n", - " 'view_angle': 4.5,\n", - " 'visible_confidence_percent': 63,\n", + " 'strip_id': '8390078',\n", + " 'sun_azimuth': 171,\n", + " 'sun_elevation': 38.4,\n", + " 'updated': '2025-10-29T10:02:27Z',\n", + " 'view_angle': 5,\n", + " 'visible_confidence_percent': 77,\n", " 'visible_percent': 100}" ] }, @@ -523,7 +522,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "20250927_192606_07_253d PSScene\n" + "20251028_192515_32_24dc PSScene\n" ] } ], @@ -594,7 +593,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "20250927_192606_07_253d activated\n", + "20251028_192515_32_24dc activated\n", "Awaiting ortho_analytic_4b activation\n" ] }, @@ -602,14 +601,14 @@ "name": "stderr", "output_type": "stream", "text": [ - "output/20250927_192606_07_253d_3B_AnalyticMS.tif: 100%|███████| 520k/520k [00:10<00:00, 52.2MB/s]" + "output/20251028_192515_32_24dc_3B_AnalyticMS.tif: 100%|██████████| 489k/489k [00:09<00:00, 53.0MB/s] " ] }, { "name": "stdout", "output_type": "stream", "text": [ - "20250927_192606_07_253d downloaded to: output/20250927_192606_07_253d_3B_AnalyticMS.tif\n" + "20251028_192515_32_24dc downloaded to: output/20251028_192515_32_24dc_3B_AnalyticMS.tif\n" ] }, { @@ -644,7 +643,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "20250927_192606_07_253d activated\n", + "20251028_192515_32_24dc activated\n", "Awaiting ortho_analytic_4b_xml activation\n" ] }, @@ -652,14 +651,14 @@ "name": "stderr", "output_type": "stream", "text": [ - "output/20250927_192606_07_253d_3B_AnalyticMS_metadata.xml: 100%|█| 0.01k/0.01k [00:00<00:00, 21.0" + "output/20251028_192515_32_24dc_3B_AnalyticMS_metadata.xml: 100%|██████████| 0.01k/0.01k [00:00<00:00, 12.8MB/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "20250927_192606_07_253d downloaded to: output/20250927_192606_07_253d_3B_AnalyticMS_metadata.xml\n" + "20251028_192515_32_24dc downloaded to: output/20251028_192515_32_24dc_3B_AnalyticMS_metadata.xml\n" ] }, { @@ -904,7 +903,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": ".venv", "language": "python", "name": "python3" }, @@ -918,7 +917,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.13.7" + "version": "3.13.0" } }, "nbformat": 4, diff --git a/jupyter-notebooks/api_guides/orders_api/planet_sdk_orders_demo.ipynb b/jupyter-notebooks/api_guides/orders_api/planet_sdk_orders_demo.ipynb index 5e0addfe..d6c84805 100644 --- a/jupyter-notebooks/api_guides/orders_api/planet_sdk_orders_demo.ipynb +++ b/jupyter-notebooks/api_guides/orders_api/planet_sdk_orders_demo.ipynb @@ -65,7 +65,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -73,8 +73,7 @@ "# If you are not already logged in, this will prompt you to open a web browser to log in.\n", "\n", "auth = Auth.from_profile('planet-user', save_state_to_storage=True)\n", - "if not auth.is_initialized():\n", - " auth.user_login(allow_open_browser=False, allow_tty_prompt=True)\n", + "auth.ensure_initialized(allow_open_browser=False, allow_tty_prompt=True)\n", "\n", "session = Session(auth)\n", "pl = Planet(session)" diff --git a/jupyter-notebooks/api_guides/subscriptions_api/land_surface_temperature_subscription.ipynb b/jupyter-notebooks/api_guides/subscriptions_api/land_surface_temperature_subscription.ipynb index 93d4ced6..e7f1ed2c 100644 --- a/jupyter-notebooks/api_guides/subscriptions_api/land_surface_temperature_subscription.ipynb +++ b/jupyter-notebooks/api_guides/subscriptions_api/land_surface_temperature_subscription.ipynb @@ -98,7 +98,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -106,8 +106,7 @@ "# If you are not already logged in, this will prompt you to open a web browser to log in.\n", "\n", "auth = Auth.from_profile('planet-user', save_state_to_storage=True)\n", - "if not auth.is_initialized():\n", - " auth.user_login(allow_open_browser=False, allow_tty_prompt=True)\n", + "auth.ensure_initialized(allow_open_browser=False, allow_tty_prompt=True)\n", "\n", "session = Session(auth)\n", "pl = Planet(session)" diff --git a/jupyter-notebooks/api_guides/subscriptions_api/subscriptions_api_quickstart.ipynb b/jupyter-notebooks/api_guides/subscriptions_api/subscriptions_api_quickstart.ipynb index eb332d02..fd401093 100644 --- a/jupyter-notebooks/api_guides/subscriptions_api/subscriptions_api_quickstart.ipynb +++ b/jupyter-notebooks/api_guides/subscriptions_api/subscriptions_api_quickstart.ipynb @@ -94,7 +94,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "0153bddd-0006-4382-8421-596a2a1502cd", "metadata": {}, "outputs": [], @@ -103,8 +103,7 @@ "# If you are not already logged in, this will prompt you to open a web browser to log in.\n", "\n", "auth = Auth.from_profile('planet-user', save_state_to_storage=True)\n", - "if not auth.is_initialized():\n", - " auth.user_login(allow_open_browser=False, allow_tty_prompt=True)\n", + "auth.ensure_initialized(allow_open_browser=False, allow_tty_prompt=True)\n", "\n", "session = Session(auth)\n", "pl = Planet(session)"