earthengine-api 1.5.13rc0__py3-none-any.whl → 1.7.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of earthengine-api might be problematic. Click here for more details.

Files changed (102) hide show
  1. {earthengine_api-1.5.13rc0.dist-info → earthengine_api-1.7.4.dist-info}/METADATA +3 -3
  2. earthengine_api-1.7.4.dist-info/RECORD +109 -0
  3. {earthengine_api-1.5.13rc0.dist-info → earthengine_api-1.7.4.dist-info}/WHEEL +1 -1
  4. ee/__init__.py +29 -28
  5. ee/_arg_types.py +7 -6
  6. ee/_cloud_api_utils.py +95 -78
  7. ee/_helpers.py +17 -13
  8. ee/_state.py +105 -0
  9. ee/_utils.py +2 -1
  10. ee/apifunction.py +21 -19
  11. ee/apitestcase.py +33 -38
  12. ee/batch.py +87 -77
  13. ee/blob.py +10 -12
  14. ee/classifier.py +57 -59
  15. ee/cli/commands.py +178 -114
  16. ee/cli/eecli.py +1 -1
  17. ee/cli/utils.py +61 -42
  18. ee/clusterer.py +39 -41
  19. ee/collection.py +64 -54
  20. ee/computedobject.py +19 -16
  21. ee/confusionmatrix.py +9 -9
  22. ee/customfunction.py +13 -12
  23. ee/data.py +220 -322
  24. ee/daterange.py +10 -10
  25. ee/deprecation.py +21 -13
  26. ee/deserializer.py +25 -20
  27. ee/dictionary.py +11 -11
  28. ee/ee_array.py +22 -20
  29. ee/ee_date.py +23 -23
  30. ee/ee_list.py +15 -16
  31. ee/ee_number.py +11 -21
  32. ee/ee_string.py +24 -32
  33. ee/ee_types.py +4 -4
  34. ee/element.py +15 -15
  35. ee/encodable.py +7 -4
  36. ee/errormargin.py +4 -4
  37. ee/feature.py +68 -71
  38. ee/featurecollection.py +41 -40
  39. ee/filter.py +90 -92
  40. ee/function.py +8 -8
  41. ee/geometry.py +95 -93
  42. ee/image.py +238 -236
  43. ee/image_converter.py +4 -4
  44. ee/imagecollection.py +30 -27
  45. ee/join.py +13 -15
  46. ee/kernel.py +55 -57
  47. ee/mapclient.py +9 -9
  48. ee/model.py +29 -31
  49. ee/oauth.py +76 -63
  50. ee/pixeltype.py +6 -6
  51. ee/projection.py +5 -4
  52. ee/reducer.py +41 -41
  53. ee/serializer.py +14 -14
  54. ee/table_converter.py +7 -6
  55. ee/terrain.py +7 -9
  56. ee/tests/_cloud_api_utils_test.py +21 -6
  57. ee/tests/_helpers_test.py +57 -4
  58. ee/tests/_state_test.py +49 -0
  59. ee/tests/algorithms.json +85 -2
  60. ee/tests/apifunction_test.py +5 -5
  61. ee/tests/batch_test.py +135 -57
  62. ee/tests/blob_test.py +5 -5
  63. ee/tests/classifier_test.py +3 -3
  64. ee/tests/clusterer_test.py +3 -3
  65. ee/tests/collection_test.py +48 -13
  66. ee/tests/confusionmatrix_test.py +3 -3
  67. ee/tests/data_test.py +484 -55
  68. ee/tests/daterange_test.py +4 -4
  69. ee/tests/deprecation_test.py +6 -4
  70. ee/tests/deserializer_test.py +64 -5
  71. ee/tests/dictionary_test.py +12 -12
  72. ee/tests/ee_array_test.py +3 -3
  73. ee/tests/ee_date_test.py +4 -4
  74. ee/tests/ee_list_test.py +3 -3
  75. ee/tests/ee_number_test.py +75 -30
  76. ee/tests/ee_string_test.py +11 -3
  77. ee/tests/ee_test.py +40 -22
  78. ee/tests/element_test.py +2 -2
  79. ee/tests/errormargin_test.py +1 -1
  80. ee/tests/feature_test.py +10 -10
  81. ee/tests/featurecollection_test.py +3 -3
  82. ee/tests/filter_test.py +4 -4
  83. ee/tests/function_test.py +5 -5
  84. ee/tests/geometry_point_test.py +3 -3
  85. ee/tests/geometry_test.py +93 -52
  86. ee/tests/image_converter_test.py +1 -3
  87. ee/tests/image_test.py +3 -3
  88. ee/tests/imagecollection_test.py +3 -3
  89. ee/tests/join_test.py +3 -3
  90. ee/tests/kernel_test.py +7 -3
  91. ee/tests/model_test.py +17 -5
  92. ee/tests/oauth_test.py +189 -7
  93. ee/tests/pixeltype_test.py +6 -7
  94. ee/tests/projection_test.py +5 -6
  95. ee/tests/reducer_test.py +16 -3
  96. ee/tests/serializer_test.py +39 -12
  97. ee/tests/table_converter_test.py +51 -7
  98. ee/tests/terrain_test.py +11 -3
  99. earthengine_api-1.5.13rc0.dist-info/RECORD +0 -107
  100. {earthengine_api-1.5.13rc0.dist-info → earthengine_api-1.7.4.dist-info}/entry_points.txt +0 -0
  101. {earthengine_api-1.5.13rc0.dist-info → earthengine_api-1.7.4.dist-info}/licenses/LICENSE +0 -0
  102. {earthengine_api-1.5.13rc0.dist-info → earthengine_api-1.7.4.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: earthengine-api
3
- Version: 1.5.13rc0
3
+ Version: 1.7.4
4
4
  Summary: Earth Engine Python API
5
5
  Author-email: Google LLC <noreply@google.com>
6
6
  License: Apache-2.0
@@ -13,17 +13,17 @@ Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python :: 3 :: Only
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
20
  Classifier: Programming Language :: Python
21
21
  Classifier: Topic :: Multimedia :: Graphics :: Viewers
22
22
  Classifier: Topic :: Scientific/Engineering :: GIS
23
23
  Classifier: Topic :: Scientific/Engineering :: Image Processing
24
24
  Classifier: Topic :: Scientific/Engineering :: Visualization
25
25
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
- Requires-Python: >=3.9
26
+ Requires-Python: >=3.10
27
27
  Description-Content-Type: text/markdown
28
28
  License-File: LICENSE
29
29
  Requires-Dist: google-cloud-storage
@@ -0,0 +1,109 @@
1
+ earthengine_api-1.7.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
2
+ ee/__init__.py,sha256=WokXvVm2tB0N1njJaANI-_F5GLtqKoq4B-3NuI3Rnf4,16758
3
+ ee/_arg_types.py,sha256=nrJrnPFnAS8fzMxAGmG3TbUOi_yFVrnSGW5IP8ATzDQ,2662
4
+ ee/_cloud_api_utils.py,sha256=5WPzP5bcBIbjA7yYN-Cwmht_HU-XobbTrZvRiOEn0e0,32890
5
+ ee/_helpers.py,sha256=afDDqoz1WESKE-lzqLtrCbvoQ1yVpfvJIgFcmUjO4L8,4821
6
+ ee/_state.py,sha256=y2hdq_ZEgFkO9a-DbWFSthehlAyTbp--cz4C04XS058,2754
7
+ ee/_utils.py,sha256=ciocjvlvR73G07IV_iZjLi1IGowpEbT53NzFqqwSbDU,1356
8
+ ee/apifunction.py,sha256=mCCsLhBs_MofvMW49OFjT5psQGMbXWQSpAlhiqMEc4k,8732
9
+ ee/apitestcase.py,sha256=8N5y2-Tw7c5GjedbSA_HRpSjVUiVLoyM_FI2g5b9Tpc,13992
10
+ ee/batch.py,sha256=pyhSmwH6hApRgdA8x6qbFn-mMEM8G-zf3OHW5PMziQI,82694
11
+ ee/blob.py,sha256=cnnqmrHl998U2zEmfKcxQglaGk14Ip6pjObk_Ody6Uk,3221
12
+ ee/classifier.py,sha256=3STLrLT6Ddwzjs2324E02wRWM8VEpeifgOO81geTHJQ,23410
13
+ ee/clusterer.py,sha256=986D68b2eJ4xiiOiIOTNZ1psF8Ro-MFNQFKed058FS4,12256
14
+ ee/collection.py,sha256=c8OFIX9OVLxTbu8HGYiHOS3Yg6QjnxaO_FAhDhDQpic,32588
15
+ ee/computedobject.py,sha256=Cdlccd4vw2neeRQlo5Jn3Q5R-VpQcQufNuxOHfpd1FU,9186
16
+ ee/confusionmatrix.py,sha256=e6vz-FcT6acWxk5pDEK0vLIN1pUjYMh5Gyn1QSGJT3I,4233
17
+ ee/customfunction.py,sha256=Me_iHDnjkYR33JMttGA7pKJlPCjUk8rO_kgaIhDm27M,7408
18
+ ee/data.py,sha256=TmtDZZXVJxKOVPNSabQ9DxtYALn1BXUHiZJKXzVL6w4,85371
19
+ ee/daterange.py,sha256=nrRYkR2M2aVU0ZJyG7yiZStFt-W2TvYVuazoZK_WZqM,4948
20
+ ee/deprecation.py,sha256=mAFdO7fBjOu9TJd8CJB_M_NsZ6VNSxtSe820QKJx8fE,6243
21
+ ee/deserializer.py,sha256=TjhQjcBnFpz8Kodoj74eSbvkJ2zLjpTTfUpcNEoQR2o,8357
22
+ ee/dictionary.py,sha256=b0t46vaeVMsFGI2icdGNspmedRtVVxfiIcFLWcmL2v8,10508
23
+ ee/ee_array.py,sha256=EJmQ-zku1x0e6z44SlVD-F7mafmvRS0DoByKFyeDCuc,36368
24
+ ee/ee_date.py,sha256=ixmLMrrGjq30DX9QY92HTeUgFZhWdn485cyaJkksh6U,10757
25
+ ee/ee_exception.py,sha256=uN3X76HuhicU0LTxqRKQu1ZU6L7zw0GuABgsBTT-Ycw,164
26
+ ee/ee_list.py,sha256=-jf0-zcqiiNexX_6GLZaRKotfmLabJ2o071Bv3MF6kI,19819
27
+ ee/ee_number.py,sha256=nNcgntUyc4h-zYLKcBIlanucxsiKqXC_koN-pzmuBnc,22376
28
+ ee/ee_string.py,sha256=eg-dR1JAuazNFyOJsbCULQn3BvBpQd5LER8oDfWtXcU,7875
29
+ ee/ee_types.py,sha256=wQCE74pDRxz_IAYc6hjSSqJwp5ozOIoZF0cHijTd8Sg,3081
30
+ ee/element.py,sha256=SdIVljB0Sbut02a61XgsPLiJpA66n34fsYZGMwsS8jQ,6261
31
+ ee/encodable.py,sha256=J9QanzbB-_f5LUCQcIhrEV5W9CbRZtxa5gicmSVxLsk,1911
32
+ ee/errormargin.py,sha256=x8kAgFeUdXmpc_kv8Vx5qv-fHeJvFU9EBFbSOxhNl8Y,3039
33
+ ee/feature.py,sha256=WItnwlQp8U3D0E0YkgJNXIAk2JviwloS9c8j2XqbKEM,30292
34
+ ee/featurecollection.py,sha256=XbDgzYEEyhim0_y2AOD5Wi-TRIl90OnB1DHtAJXgvg8,14424
35
+ ee/filter.py,sha256=GKz3IqeZSrK4X26TjWaw_uOE8KjZgSx1pS1zM07PXfI,35321
36
+ ee/function.py,sha256=X-Mz0AvF_l809NZXK8RM6fa2h-nP7YU2sUFp6hvIbdU,7049
37
+ ee/geometry.py,sha256=D__UeT72DDaJFakmyaPnmfHwxNtDxLJW7Vbze0Hh2Y4,59517
38
+ ee/image.py,sha256=LDidnOBIQaZ1Rv9X8H6DcNUzClRYxXcy2lHGoe5L6pA,170921
39
+ ee/image_converter.py,sha256=LblcmkWruE0BjItZ7ICv87XZlCCjZeX2HmGxf47HXyo,1469
40
+ ee/imagecollection.py,sha256=5ZUUreU0iY23UC9sd8gh8fLapVZTruV3DGhsjmQF0xg,27102
41
+ ee/join.py,sha256=idnuzRNFvKHRLHV5m9unp_xTsZb-E2kfgUCEYSg64ts,7578
42
+ ee/kernel.py,sha256=eTzJFvW4nbyiFl2dDZ0_cA_o3KqCbBewY-BDp7tCB_M,15002
43
+ ee/mapclient.py,sha256=feCFwL76juFFZPI4uycVxUoFMeEFbPFfIVETkmpvmcY,17491
44
+ ee/model.py,sha256=ZLBT0bdo16V_fSR3eqVxvEmkpGGqMdqYBVZTwOAXvcU,12069
45
+ ee/oauth.py,sha256=i2R56YDJwC9A1Wpf9MOz-01L4PYoHvuIs0TnCpjlLxU,22194
46
+ ee/pixeltype.py,sha256=ucUwJ5SvcOT849Ap4mlJL9z11IAbcT1w9ii8-zOoqdI,5196
47
+ ee/projection.py,sha256=n7WvMeYEG9zksGN1tIX7RGweC4IyCrXAKsvPY0e2b8k,5868
48
+ ee/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
+ ee/reducer.py,sha256=zO-bhNOQPoWlzjvXiHC40hwg3KFmA52eQb1uutUW1MQ,33813
50
+ ee/serializer.py,sha256=Nzy3NnwSTnNTkRy4qJQ8NyswaG-VbLS6R7zT0Fvoa04,22781
51
+ ee/table_converter.py,sha256=z6ttgglqpbs4RViOZ-DI7g7babySB8Qaa1Ge-ONyXxE,2062
52
+ ee/terrain.py,sha256=TIbeQiVGv4okTTsHCnaP6TxSvaRF-GX_06asVIFN8dY,4873
53
+ ee/cli/__init__.py,sha256=YjzBDuYi6fiOv77Xfl-Qib2O6gRZj9z7Sx2Zz6teTXU,33
54
+ ee/cli/commands.py,sha256=-Quo-cq0MRIpVmGt5xpAgNS0oVU6JJTXpg3npbYmyPw,73444
55
+ ee/cli/eecli.py,sha256=1yDyingkwurai13F_PF91RYsBev6jGJ9WEoZaT2Dgy8,3043
56
+ ee/cli/eecli_wrapper.py,sha256=Z7R3IJcht2uG1h57oY7BSrkPiwQzNmmYlyCSX1_7L7c,1089
57
+ ee/cli/utils.py,sha256=OcGKS8fe26aXReYVSswv3n1DQlG4FcQEfHqBIHF3AOs,14233
58
+ ee/tests/_cloud_api_utils_test.py,sha256=p8kwehArlj_j4HWsx6vNEk2Dw17MlxYw0XtzupsDWdY,19493
59
+ ee/tests/_helpers_test.py,sha256=vyhbY9hE_zcSI692eAdjtM36P2vVXScDj_ENA-0tces,3991
60
+ ee/tests/_state_test.py,sha256=AKe5Vopzt24FJPiPcEce_oOT861gOkd6mUOAWZr6C0g,1175
61
+ ee/tests/_utils_test.py,sha256=bOarVj3U-VFo9Prog8WQN_hAOMwJOiWKJxevUbdFPBQ,2753
62
+ ee/tests/algorithms.json,sha256=Vx1Kx_MhHv0z0B3WTeVAvchM8xVd3zYE7L-qT3gDGzA,729368
63
+ ee/tests/apifunction_test.py,sha256=_6xpkJOd7hScYYQxzFR-8flraTQ6xfkm7gyER6JoBog,3779
64
+ ee/tests/batch_test.py,sha256=NhR5CsNNSbuMgrmJWoc0grn7gjmlUY37oMIXCwA2T-0,65116
65
+ ee/tests/blob_test.py,sha256=uCrM-ubRfAmNgHwhmUhWn7MiXqbNQutybcXIKdVsD_Q,3587
66
+ ee/tests/classifier_test.py,sha256=K6-wNZ2uh9oPYo7BV0vtfU73SBFpeNcFRMRmvEFc6Pg,19087
67
+ ee/tests/cloud_api_discovery_document.json,sha256=SnOeL8One57YdeHa7XxGZM-ptDPCeDSymBc7-Bo_hkA,41154
68
+ ee/tests/clusterer_test.py,sha256=B4m06wAtBeqvnIhRD2lnNy1UHDB_caleK_CqcrAU8dk,11620
69
+ ee/tests/collection_test.py,sha256=zsBerYrFr390awe-wD8uN9VME_qEsuaEN197hom4Xps,8815
70
+ ee/tests/computedobject_test.py,sha256=B27rDq9Urpvy0WqpdbKRYbt6AcT1i93HX-es7hrhWVY,4840
71
+ ee/tests/confusionmatrix_test.py,sha256=46JJh1-91AiYISXWZ6-2lvY5_Njvc8ompO9kmwqlFdg,7437
72
+ ee/tests/data_test.py,sha256=8oiSnzGoOtWx3YIld8owWYw1zC517uLkq1Uf2Xn4iCI,52063
73
+ ee/tests/daterange_test.py,sha256=a5fpg2lko3kCJzxQPCoAc_vjXkKy2zYcXbeSZKAFovI,8583
74
+ ee/tests/deprecation_test.py,sha256=CoVug7J9YdB2utZ-BikyJcjitYPQLz49JL_z89xuQSQ,8484
75
+ ee/tests/deserializer_test.py,sha256=i_tlyzKgCo1-VpWPAQnTWNcr2klourcMcBbFZJN6Ivw,5050
76
+ ee/tests/dictionary_test.py,sha256=IRaXMr3GzZFQ5BiHdB35Iio2TckIK67Cnp6KH0h8Aa8,11818
77
+ ee/tests/ee_array_test.py,sha256=JVXShdbOVOjlfSpNgYc_NVrknQatuPOZ19fG0Ii5yVU,50268
78
+ ee/tests/ee_date_test.py,sha256=8rLUXfjyiW3LiBOCSneA7ZGgmoFgN5oZr58x5THtKGY,11106
79
+ ee/tests/ee_list_test.py,sha256=yd2EWZGdg7pLJhsHSR5AbK58ZhT31GY-n2o1dDT3p9A,21797
80
+ ee/tests/ee_number_test.py,sha256=YuJAWg4V4ELCLdmpEN7f4Wc_6ayOreWKui8ZM5fkjbg,35029
81
+ ee/tests/ee_string_test.py,sha256=X6XJwa09yJXhg0rIpRb4QFA3eeGIrh2XClwhVByMRBY,9664
82
+ ee/tests/ee_test.py,sha256=CY5XUfh_5Bx6yIUrHDI1SbVfztIgejB-LGdgCMgT0IA,17835
83
+ ee/tests/ee_types_test.py,sha256=oRnqplaTWg47zuYfAYTTVwembCnw8XT20HPNMdAvgNE,921
84
+ ee/tests/element_test.py,sha256=Gft1vmSeuhSelRHsdGKHd3S1xucnUQJh8ZlGSZ2JxRw,1968
85
+ ee/tests/errormargin_test.py,sha256=YEBzvBFsD756nicZBcjnPFAXy06jZNKiSSAa2hAzN-M,5061
86
+ ee/tests/feature_test.py,sha256=-iq-p9xidPV0WE398j1nWL6Gn4Yvi_CQRetHbHhDooM,22514
87
+ ee/tests/featurecollection_test.py,sha256=b3SwieXb8nyRzAlwKK_nSa4xGcy5AynIDZ1A3sV02Es,38440
88
+ ee/tests/filter_test.py,sha256=d-KQ_zI-r7BAMazKqqHMMzNUZdeC46BZiciMfthKEO8,35033
89
+ ee/tests/function_test.py,sha256=0hv7H-Q21vdDvqHNH_3NvFj_nPEWM2Fh7CD0wgjXE2M,3131
90
+ ee/tests/geometry_point_test.py,sha256=w9MYTwvw2Co9rIjffFB0ezQ_jZz8nxbdgOcyhqTTmjk,15093
91
+ ee/tests/geometry_test.py,sha256=5cNblTtXg4gg0k1_6go4XL2EldY2StOfD7sQ7Bu0WZU,32424
92
+ ee/tests/image_converter_test.py,sha256=x29StMrzv6jlATtx3XXC7rEo7Cgrcx0XyVoM-ccVuao,1853
93
+ ee/tests/image_test.py,sha256=_SJmee7orPot26vbxKEZcNZ6OsrNrxv3ToInWYLNZLM,150917
94
+ ee/tests/imagecollection_test.py,sha256=qosRZXCbhwFuy8qR7DbA-FMl4ktW7Y2cUJHeXLcszpg,38444
95
+ ee/tests/join_test.py,sha256=pFILq3qM27rO64WYbBC1A_Gs8_pabRv68X7MU_EM_cw,7630
96
+ ee/tests/kernel_test.py,sha256=-0nZVNSxE1IGs4y60oijISh2Hi1V7NCjrmUnEMDd0nQ,19378
97
+ ee/tests/model_test.py,sha256=dgnWfqR4R4MIUljMBL1TOcztzA-lWEl7cT5f2Y0k2ck,12483
98
+ ee/tests/oauth_test.py,sha256=8hldNiR3AYtQkWA4vwwSAO6jDIsh_fww7b_cOI9MJjo,9202
99
+ ee/tests/pixeltype_test.py,sha256=00IWKnZ7xxkVwSSCuWOlCwlTsHAb3XPyKp1Arc4S12U,10024
100
+ ee/tests/projection_test.py,sha256=fKXXxQPBvWdlMNtNsJze2pbsT0yHHlL7ON8Pdjm1Z7E,6871
101
+ ee/tests/reducer_test.py,sha256=vqXpgLZ7fPyfZ12srpREgMpfrKYLcFQod3Qn1Niv7VM,31979
102
+ ee/tests/serializer_test.py,sha256=d6IEW_dt-G900IRfQnZftrwjpc1wJ-ouaQQwaLO0FxI,9834
103
+ ee/tests/table_converter_test.py,sha256=t4yIfy40R3U17I_2nVtKm_Q2Tae-UifwZLz8qOmoC9A,5091
104
+ ee/tests/terrain_test.py,sha256=inZ2sy807nDG_HMutzGHaqcTUaLnZQOMdWyf0NrQzV0,4561
105
+ earthengine_api-1.7.4.dist-info/METADATA,sha256=MX9gSJaNeM3FPgvXYmd_UuwcLwbiA8Jwse608jMlBw0,2144
106
+ earthengine_api-1.7.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
107
+ earthengine_api-1.7.4.dist-info/entry_points.txt,sha256=-Ax4SCU-S474r8OD2LIxata6PRmkZoDrppQ4fP_exNc,50
108
+ earthengine_api-1.7.4.dist-info/top_level.txt,sha256=go5zOwCgm5lIS3yTR-Vsxp1gNI4qdS-MP5eY-7zMxVY,3
109
+ earthengine_api-1.7.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
ee/__init__.py CHANGED
@@ -1,16 +1,17 @@
1
1
  """The EE Python library."""
2
2
 
3
- __version__ = '1.5.13rc0'
3
+ __version__ = '1.7.4'
4
4
 
5
5
  # Using lowercase function naming to match the JavaScript names.
6
6
  # pylint: disable=g-bad-name
7
7
 
8
8
  import collections
9
+ from collections.abc import Hashable, Sequence
9
10
  import datetime
10
11
  import inspect
11
12
  import os
12
13
  import re
13
- from typing import Any, Hashable, List as ListType, Optional, Sequence, Tuple, Type, Union
14
+ from typing import Any, Optional, Type, Union
14
15
 
15
16
  from google.oauth2 import service_account
16
17
 
@@ -66,7 +67,7 @@ from .terrain import Terrain
66
67
  _HAS_DYNAMIC_ATTRIBUTES = True
67
68
 
68
69
  # A list of autogenerated class names added by _InitializeGeneratedClasses.
69
- _generatedClasses: ListType[str] = []
70
+ _generatedClasses: list[str] = []
70
71
 
71
72
  NO_PROJECT_EXCEPTION = ('ee.Initialize: no project found. Call with project='
72
73
  ' or see http://goo.gle/ee-auth.')
@@ -125,13 +126,13 @@ _DYNAMIC_CLASSES = [
125
126
 
126
127
 
127
128
  def Authenticate(
128
- authorization_code: Optional[str] = None,
129
- quiet: Optional[bool] = None,
130
- code_verifier: Optional[str] = None,
131
- auth_mode: Optional[str] = None,
132
- scopes: Optional[Sequence[str]] = None,
129
+ authorization_code: str | None = None,
130
+ quiet: bool | None = None,
131
+ code_verifier: str | None = None,
132
+ auth_mode: str | None = None,
133
+ scopes: Sequence[str] | None = None,
133
134
  force: bool = False,
134
- ) -> Optional[bool]:
135
+ ) -> bool | None:
135
136
  """Prompts the user to authorize access to Earth Engine via OAuth2.
136
137
 
137
138
  Args:
@@ -161,21 +162,21 @@ def Authenticate(
161
162
 
162
163
  @_utils.accept_opt_prefix('opt_url')
163
164
  def Initialize(
164
- credentials: Optional[Any] = 'persistent',
165
- url: Optional[str] = None,
166
- cloud_api_key: Optional[str] = None,
167
- http_transport: Optional[Any] = None,
168
- project: Optional[Union[str, int]] = None,
165
+ credentials: Any | None = 'persistent',
166
+ url: str | None = None,
167
+ cloud_api_key: str | None = None,
168
+ http_transport: Any | None = None,
169
+ project: str | int | None = None,
169
170
  ) -> None:
170
171
  """Initialize the EE library.
171
172
 
172
173
  If this hasn't been called by the time any object constructor is used,
173
- it will be called then. If this is called a second time with a different
174
+ it will be called then. If this is called a second time with a different
174
175
  URL, this doesn't do an un-initialization of, e.g., the previously loaded
175
176
  Algorithms, but will overwrite them and let point at alternate servers.
176
177
 
177
178
  Args:
178
- credentials: OAuth2 credentials. 'persistent' (default) means use
179
+ credentials: OAuth2 credentials. 'persistent' (default) means use
179
180
  credentials already stored in the filesystem, or raise an explanatory
180
181
  exception guiding the user to create those credentials.
181
182
  url: The base url for the EarthEngine REST API to connect to.
@@ -193,10 +194,10 @@ def Initialize(
193
194
  project = project or None
194
195
  # A project must be given, but SDK projects are not authorized for EE.
195
196
  is_valid_project = project and not oauth.is_sdk_project(project)
196
- is_sa_creds = isinstance(credentials, service_account.Credentials)
197
197
  # An explicit project is not required for service accounts, since they use
198
198
  # their containing project by default.
199
- if not is_valid_project and not is_sa_creds:
199
+ empty_project_ok = isinstance(credentials, service_account.Credentials)
200
+ if not is_valid_project and not empty_project_ok:
200
201
  raise EEException(NO_PROJECT_EXCEPTION)
201
202
 
202
203
  data.initialize(
@@ -273,7 +274,7 @@ def _ResetGeneratedClasses() -> None:
273
274
  types._registerClasses(globals()) # pylint: disable=protected-access
274
275
 
275
276
 
276
- def _Promote(arg: Optional[Any], a_class: str) -> Optional[Any]:
277
+ def _Promote(arg: Any | None, a_class: str) -> Any | None:
277
278
  """Wrap an argument in an object of the specified class.
278
279
 
279
280
  This is used to, e.g., promote numbers or strings to Images and arrays
@@ -311,7 +312,7 @@ def _Promote(arg: Optional[Any], a_class: str) -> Optional[Any]:
311
312
  return Element(arg.func, arg.args, arg.varName)
312
313
  else:
313
314
  # No way to convert.
314
- raise EEException('Cannot convert {0} to Element.'.format(arg))
315
+ raise EEException(f'Cannot convert {arg} to Element.')
315
316
  elif a_class == 'Geometry':
316
317
  if isinstance(arg, Collection):
317
318
  return ApiFunction.call_('Collection.geometry', arg)
@@ -340,7 +341,7 @@ def _Promote(arg: Optional[Any], a_class: str) -> Optional[Any]:
340
341
  # Image.parseExpression().
341
342
  return arg
342
343
  else:
343
- raise EEException('Argument is not a function: {0}'.format(arg))
344
+ raise EEException(f'Argument is not a function: {arg}')
344
345
  elif a_class == 'Dictionary':
345
346
  if isinstance(arg, dict):
346
347
  return arg
@@ -372,7 +373,7 @@ def _Promote(arg: Optional[Any], a_class: str) -> Optional[Any]:
372
373
  # arg is the name of a method in a_class.
373
374
  return getattr(cls, arg)()
374
375
  else:
375
- raise EEException('Unknown algorithm: {0}.{1}'.format(a_class, arg))
376
+ raise EEException(f'Unknown algorithm: {a_class}.{arg}')
376
377
  else:
377
378
  # Client-side cast.
378
379
  return cls(arg)
@@ -419,9 +420,9 @@ def _InitializeGeneratedClasses() -> None:
419
420
  """Generate classes for extra types that appear in the web API."""
420
421
  signatures = ApiFunction.allSignatures()
421
422
  # Collect the first part of all function names.
422
- names = set([name.split('.')[0] for name in signatures])
423
+ names = {name.split('.')[0] for name in signatures}
423
424
  # Collect the return types of all functions.
424
- returns = set([signatures[sig]['returns'] for sig in signatures])
425
+ returns = {signatures[sig]['returns'] for sig in signatures}
425
426
 
426
427
  want = [name for name in names.intersection(returns) if name not in globals()]
427
428
 
@@ -435,14 +436,14 @@ def _InitializeGeneratedClasses() -> None:
435
436
  types._registerClasses(globals()) # pylint: disable=protected-access
436
437
 
437
438
 
438
- def _MakeClass(name: str) -> Type[Any]:
439
+ def _MakeClass(name: str) -> type[Any]:
439
440
  """Generates a dynamic API class for a given name."""
440
441
 
441
442
  def init(self, *args, **kwargs):
442
443
  """Initializer for dynamically created classes.
443
444
 
444
445
  Args:
445
- self: The instance of this class. Listed to make the linter hush.
446
+ self: The instance of this class. Listed to make the linter hush.
446
447
  *args: Either a ComputedObject to be promoted to this type, or
447
448
  arguments to an algorithm with the same name as this class.
448
449
  **kwargs: Any kwargs passed to this class constructor.
@@ -480,11 +481,11 @@ def _MakeClass(name: str) -> Type[Any]:
480
481
  if not onlyOneArg:
481
482
  # We don't know what to do with multiple args.
482
483
  raise EEException(
483
- 'Too many arguments for ee.{0}(): {1}'.format(name, args))
484
+ f'Too many arguments for ee.{name}(): {args}')
484
485
  elif firstArgIsPrimitive:
485
486
  # Can't cast a primitive.
486
487
  raise EEException(
487
- 'Invalid argument for ee.{0}(): {1}. '
488
+ 'Invalid argument for ee.{}(): {}. '
488
489
  'Must be a ComputedObject.'.format(name, args))
489
490
 
490
491
  result = args[0]
ee/_arg_types.py CHANGED
@@ -1,8 +1,9 @@
1
1
  """Internal types used to represent arguments to the API."""
2
2
  from __future__ import annotations
3
3
 
4
+ from collections.abc import Sequence
4
5
  import datetime
5
- from typing import Any as AnyType, Dict, List as ListType, Sequence, Tuple, Union
6
+ from typing import Any as AnyType, Union
6
7
 
7
8
  from ee import classifier
8
9
  from ee import clusterer
@@ -27,7 +28,7 @@ from ee import reducer
27
28
 
28
29
  Array = Union[
29
30
  AnyType,
30
- ListType[AnyType],
31
+ list[AnyType],
31
32
  ee_array.Array,
32
33
  ee_list.List,
33
34
  computedobject.ComputedObject,
@@ -43,7 +44,7 @@ Date = Union[
43
44
  ]
44
45
  DateRange = Union[daterange.DateRange, computedobject.ComputedObject]
45
46
  Dictionary = Union[
46
- Dict[AnyType, AnyType],
47
+ dict[AnyType, AnyType],
47
48
  Sequence[AnyType],
48
49
  dictionary.Dictionary,
49
50
  computedobject.ComputedObject,
@@ -68,9 +69,9 @@ ImageCollection = Union[
68
69
  Integer = Union[int, ee_number.Number, computedobject.ComputedObject]
69
70
  Kernel = Union[kernel.Kernel, computedobject.ComputedObject]
70
71
  List = Union[
71
- ListType[AnyType],
72
- Tuple[()],
73
- Tuple[AnyType, AnyType],
72
+ list[AnyType],
73
+ tuple[()],
74
+ tuple[AnyType, AnyType],
74
75
  ee_list.List,
75
76
  computedobject.ComputedObject,
76
77
  ]