django-esi 8.0.0a3__py3-none-any.whl → 8.0.0b1__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 django-esi might be problematic. Click here for more details.

Files changed (44) hide show
  1. {django_esi-8.0.0a3.dist-info → django_esi-8.0.0b1.dist-info}/METADATA +3 -2
  2. {django_esi-8.0.0a3.dist-info → django_esi-8.0.0b1.dist-info}/RECORD +44 -33
  3. esi/__init__.py +2 -2
  4. esi/aiopenapi3/plugins.py +100 -3
  5. esi/clients.py +15 -6
  6. esi/helpers.py +37 -0
  7. esi/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
  8. esi/locale/cs_CZ/LC_MESSAGES/django.po +53 -0
  9. esi/locale/de/LC_MESSAGES/django.mo +0 -0
  10. esi/locale/de/LC_MESSAGES/django.po +10 -9
  11. esi/locale/en/LC_MESSAGES/django.mo +0 -0
  12. esi/locale/en/LC_MESSAGES/django.po +3 -3
  13. esi/locale/es/LC_MESSAGES/django.mo +0 -0
  14. esi/locale/es/LC_MESSAGES/django.po +12 -10
  15. esi/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
  16. esi/locale/fr_FR/LC_MESSAGES/django.po +18 -10
  17. esi/locale/it_IT/LC_MESSAGES/django.mo +0 -0
  18. esi/locale/it_IT/LC_MESSAGES/django.po +12 -10
  19. esi/locale/ja/LC_MESSAGES/django.mo +0 -0
  20. esi/locale/ja/LC_MESSAGES/django.po +10 -9
  21. esi/locale/ko_KR/LC_MESSAGES/django.mo +0 -0
  22. esi/locale/ko_KR/LC_MESSAGES/django.po +10 -9
  23. esi/locale/nl_NL/LC_MESSAGES/django.mo +0 -0
  24. esi/locale/nl_NL/LC_MESSAGES/django.po +53 -0
  25. esi/locale/pl_PL/LC_MESSAGES/django.mo +0 -0
  26. esi/locale/pl_PL/LC_MESSAGES/django.po +53 -0
  27. esi/locale/ru/LC_MESSAGES/django.mo +0 -0
  28. esi/locale/ru/LC_MESSAGES/django.po +13 -10
  29. esi/locale/sk/LC_MESSAGES/django.mo +0 -0
  30. esi/locale/sk/LC_MESSAGES/django.po +55 -0
  31. esi/locale/uk/LC_MESSAGES/django.mo +0 -0
  32. esi/locale/uk/LC_MESSAGES/django.po +57 -0
  33. esi/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  34. esi/locale/zh_Hans/LC_MESSAGES/django.po +10 -9
  35. esi/management/commands/generate_esi_stubs.py +11 -31
  36. esi/models.py +1 -1
  37. esi/openapi_clients.py +207 -54
  38. esi/stubs.pyi +395 -395
  39. esi/tests/__init__.py +3 -3
  40. esi/tests/test_clients.py +77 -19
  41. esi/tests/test_openapi.json +264 -0
  42. esi/tests/test_openapi.py +402 -1
  43. {django_esi-8.0.0a3.dist-info → django_esi-8.0.0b1.dist-info}/WHEEL +0 -0
  44. {django_esi-8.0.0a3.dist-info → django_esi-8.0.0b1.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-esi
3
- Version: 8.0.0a3
3
+ Version: 8.0.0b1
4
4
  Summary: Django app for accessing the EVE Swagger Interface (ESI).
5
5
  Keywords: eveonline
6
6
  Author-email: Alliance Auth <adarnof@gmail.com>
@@ -20,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
23
24
  Classifier: Topic :: Internet :: WWW/HTTP
24
25
  Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
25
26
  License-File: LICENSE
@@ -27,7 +28,7 @@ Requires-Dist: aiopenapi3
27
28
  Requires-Dist: bravado>=10.6,<12
28
29
  Requires-Dist: celery>=4.0.2
29
30
  Requires-Dist: django>=4.2,<6
30
- Requires-Dist: httpx[http2, brotli, zstd]
31
+ Requires-Dist: httpx[brotli, http2, zstd]
31
32
  Requires-Dist: jsonschema<4
32
33
  Requires-Dist: python-jose>=3.3
33
34
  Requires-Dist: requests>=2.26
@@ -1,44 +1,54 @@
1
- esi/__init__.py,sha256=h7UNGlHMW_Mr3hZ1uc6-nP6J4YJU0GnnNvq1WRgx1Eo,199
1
+ esi/__init__.py,sha256=vsNIce83g99LxdSg1jj7tPr0a4Eq2SwB-9SfKADjZUM,204
2
2
  esi/admin.py,sha256=9i68WwW_gR0zsGhJKTWK2yMEi44EkhpAaOW0LDpVfM8,1176
3
3
  esi/app_settings.py,sha256=2Jp_1myzKCL8A20RYvwQnQd04Ds_CBGsCqwDtsrYf0M,4289
4
4
  esi/apps.py,sha256=HIu1niTkOXYmCzMVAjYcaFhHrrXeBbHvui6I44OCHXw,280
5
5
  esi/checks.py,sha256=31puQdsrpRUJB-kedp2k7Evo0x2knTWQPZsCUUrJ3dY,1912
6
- esi/clients.py,sha256=WB5YseJnfZdTeJ9C1Eze-iWXEqIpo5i_8uiQ6w0VkCw,23503
6
+ esi/clients.py,sha256=KNFNa5SXFshifap84Q1rCNgZusQ3vmRlePIQG3XICUE,23894
7
7
  esi/decorators.py,sha256=2RmPdkrIAwbxOV5Ls8-RIWd_VhmXEDzIG6g5-bs6WZc,9093
8
8
  esi/errors.py,sha256=KfFtgX8Mys4uMoQtco0n_pQeaM83yVrRSyW6StXuUjo,308
9
9
  esi/exceptions.py,sha256=nR-Z0BXVt5xSkgUL56E97pqtTyEu3MFr8_P0uCCCQ-E,1448
10
- esi/helpers.py,sha256=-lYojtcWYWtlC_olSItWR3O3zJpjMYTQpNvsax81us8,672
10
+ esi/helpers.py,sha256=pafq8XZ6NAsaOYNqAvgbJ4n0JHCopDtUd3h_HWLcg4c,2206
11
11
  esi/managers.py,sha256=zdri1aSJrSX9W_kwzbXq44CAAhdufikoOViaJntA41A,11443
12
12
  esi/managers.pyi,sha256=BxRNX2yOT3domdrxsuGp4G0TrP_bWmf8VVwvM03eHQE,1977
13
- esi/models.py,sha256=v33dvnWoiDwhcwc5Y4CvNOtAJocNd2qh5JtyNTtu-P8,11483
14
- esi/openapi_clients.py,sha256=ORYRPjW4pqmmMFmaK6oiIHsCpVlLL-s7LTKcXA3xhSM,36874
13
+ esi/models.py,sha256=MEY8jmHGwA8ZJjq37h-vC8LnOVn_Mnv5Gw0NoI9tkXk,11484
14
+ esi/openapi_clients.py,sha256=kmijZukB7wICIG5lCEd_3uRha0qAR_sKyHn48V4azts,41127
15
15
  esi/rate_limiting.py,sha256=fUzso1YCHlBes8SVrEAsP58eRWcFNuO2XEkW6RQLhUE,2600
16
16
  esi/stubs.py,sha256=UakysEAq5V454oKbxyEUewncr5sCFZCgwHFh0SJvU3Y,30
17
- esi/stubs.pyi,sha256=rmWy-cM_qcZyEIAQcAbNJ2jMtgPU4Ai-SOncFmuBHSA,233649
17
+ esi/stubs.pyi,sha256=ua9zHzZtrWct1mj_UV1pN7HJyA2RxqWPYapL7DQMRYA,244089
18
18
  esi/tasks.py,sha256=TaE_Q03oLk1ohkPw8KknXpIK-nY47C-oaGUUu4nr8pw,2658
19
19
  esi/urls.py,sha256=B4EnmT-MZzs4F8a9ORK1ejAHbpGRN_V4TKks8ww3JGE,151
20
20
  esi/views.py,sha256=cq2JkqSAwx-Nqi3amRUA9CKLu3ZLQYHSAH8c8g7xIQ4,3917
21
- esi/aiopenapi3/plugins.py,sha256=1JGDhsca2vO_R_J5Gi4b5_lK0VDQ_AoyMHHyvzYoLrM,4673
22
- esi/locale/de/LC_MESSAGES/django.mo,sha256=9_Fc_R8oZpT_CojH8gBxdSqj2K84EMEMn4wkvmOr7Dg,820
23
- esi/locale/de/LC_MESSAGES/django.po,sha256=2NQVGYzLroHPPrWgmACSnb2d3nwlkMBLxA1uWU3K0FA,1503
24
- esi/locale/en/LC_MESSAGES/django.mo,sha256=N1pb17IfLd0ASiKO8d68-B4ygSpDkhKOCs8YTzMXQo0,380
25
- esi/locale/en/LC_MESSAGES/django.po,sha256=Ex11J8RaZM4KuP8xGtRi-TrSSAG05jU-KiemYeG84yc,1305
26
- esi/locale/es/LC_MESSAGES/django.mo,sha256=dtCivRk6vD0mT2Wx9kcBRtMhU41bdqERHkBYPLoI5qg,737
27
- esi/locale/es/LC_MESSAGES/django.po,sha256=KvCk4FLdPl_SMEcEWL6KAr870ScmsL5jnyCJvpglOB4,1504
28
- esi/locale/fr_FR/LC_MESSAGES/django.mo,sha256=CG7EL6JGYoSVaAggmIvwerXuzf55b6VWmcOSK_1okik,643
29
- esi/locale/fr_FR/LC_MESSAGES/django.po,sha256=Tbzu6dMnnpILbMCUdzNC2VP4cOmrI8k0pWXGcNMqxZ0,1357
30
- esi/locale/it_IT/LC_MESSAGES/django.mo,sha256=uxEHOVorXW8JVcXmQwfUdfZAKZuQjnJLtJfc5v7EHVQ,877
31
- esi/locale/it_IT/LC_MESSAGES/django.po,sha256=SFWEDp_hRVrm1mIW6I8IgOfSQ8kNMX6q8jZeYzZMuRU,1560
32
- esi/locale/ja/LC_MESSAGES/django.mo,sha256=ogBCpZ3zBBiA10Ceu2rd8LnE8h3y6zgcKUCGNosUoo0,707
33
- esi/locale/ja/LC_MESSAGES/django.po,sha256=uWDpo_f8YyTn6VIH1S87PbGvQnsCiKe_i9LYmiJPy3Q,1476
34
- esi/locale/ko_KR/LC_MESSAGES/django.mo,sha256=-GXsBq-bhlghnrxsuNfS2rirCJn9sPQi1whTvRCvGV4,746
35
- esi/locale/ko_KR/LC_MESSAGES/django.po,sha256=gjPHlrraWxVBS-H4n88y-5a2n7PbwvwZzeaZdP5aquc,1511
36
- esi/locale/ru/LC_MESSAGES/django.mo,sha256=WbKkLTav0kXvfTadQ6fccwh0T7iI_1wmPVu_LjQaYMo,915
37
- esi/locale/ru/LC_MESSAGES/django.po,sha256=zQm-QOcIIu3vfU60bG2zFXv1sstsEV39EcN0VJErHrs,1812
38
- esi/locale/zh_Hans/LC_MESSAGES/django.mo,sha256=hPSO7wlU9cN8f32Qo1Dztq6AHUm2hZfL1hHIDW1R1F4,681
39
- esi/locale/zh_Hans/LC_MESSAGES/django.po,sha256=fZhif8jOUvY22xurl7eBYsHNKoqf7obtkW5L3894hk4,1451
21
+ esi/aiopenapi3/plugins.py,sha256=jMW82FM-g_aL-RfmB7ip3xmXF1-Evq-euv3KMbEfWds,7898
22
+ esi/locale/cs_CZ/LC_MESSAGES/django.mo,sha256=WyxsjDEeArGMNhtpY2eCJjdENMDmmxdxz4oW1s4N5eA,391
23
+ esi/locale/cs_CZ/LC_MESSAGES/django.po,sha256=mlmqr5WqKZr7AI1AGPYt7W10vfJmvgLddbD16ClX5hQ,1317
24
+ esi/locale/de/LC_MESSAGES/django.mo,sha256=uNJPd25k3AUU6FceBsJV9pqCpM1ZW4wDDFKNZkPlXqg,874
25
+ esi/locale/de/LC_MESSAGES/django.po,sha256=ahUQxXocWCsyE7xj5OpG4iBDeE4cL1Xdm-OQvf7N-Q4,1563
26
+ esi/locale/en/LC_MESSAGES/django.mo,sha256=gtTXjZjZ18WCvehANkW-Uo_YU4dOolu57DYXtWnOZkA,434
27
+ esi/locale/en/LC_MESSAGES/django.po,sha256=CeihWA8VviLtx-x1sS3lr10nNLOyg1wEQZGeBBbyK8g,1364
28
+ esi/locale/es/LC_MESSAGES/django.mo,sha256=XegUUE14RGv9SYxO7FoJjz2jNvG64hA8oOFhqjYZc8g,791
29
+ esi/locale/es/LC_MESSAGES/django.po,sha256=yAF4Kcv9px0utUmAhYuQnaZzS4SDwEA0cax4hOx_e6k,1567
30
+ esi/locale/fr_FR/LC_MESSAGES/django.mo,sha256=FFAiYNUgD1zv056mRf3actNPDDIagu3Bb13EXaAlV94,697
31
+ esi/locale/fr_FR/LC_MESSAGES/django.po,sha256=L4noD0WBE2389Zzo2k5rxUWWhAO5Obm7eyVOOF4TDxY,1576
32
+ esi/locale/it_IT/LC_MESSAGES/django.mo,sha256=SicuHgSlkdIV-Jc9QuR4JaC8QwfycDznJR0yuP9jCoI,931
33
+ esi/locale/it_IT/LC_MESSAGES/django.po,sha256=DNwyc7pZuFXYthb07SIFTRNowLiXhkk1X9OwuKa-MXE,1623
34
+ esi/locale/ja/LC_MESSAGES/django.mo,sha256=0900q-CQ5WT98zWn746YfdOy51uE_nlEbJyxogqxrvc,761
35
+ esi/locale/ja/LC_MESSAGES/django.po,sha256=kpVz2TLwFYGCc1vkCXiMBhLk9LkBypox6oIF0rmGBW8,1536
36
+ esi/locale/ko_KR/LC_MESSAGES/django.mo,sha256=7NktQKVols2D9r8LH0fVmNXtF4L3tmKyAf90IoRhSAY,800
37
+ esi/locale/ko_KR/LC_MESSAGES/django.po,sha256=PQrNrTxw6bTU43KUSNc0okGXes21cSZ3_4MAhBIA1jw,1571
38
+ esi/locale/nl_NL/LC_MESSAGES/django.mo,sha256=WyxsjDEeArGMNhtpY2eCJjdENMDmmxdxz4oW1s4N5eA,391
39
+ esi/locale/nl_NL/LC_MESSAGES/django.po,sha256=mlmqr5WqKZr7AI1AGPYt7W10vfJmvgLddbD16ClX5hQ,1317
40
+ esi/locale/pl_PL/LC_MESSAGES/django.mo,sha256=WyxsjDEeArGMNhtpY2eCJjdENMDmmxdxz4oW1s4N5eA,391
41
+ esi/locale/pl_PL/LC_MESSAGES/django.po,sha256=mlmqr5WqKZr7AI1AGPYt7W10vfJmvgLddbD16ClX5hQ,1317
42
+ esi/locale/ru/LC_MESSAGES/django.mo,sha256=g9515s_BB2pyCJe9-oqPXGEU7vc0EdFoh1SpTUCkGus,1128
43
+ esi/locale/ru/LC_MESSAGES/django.po,sha256=pBczyt5Ri0MD7NB_zCC7FFxFOrTOFIMeN7zMi8b0slM,1878
44
+ esi/locale/sk/LC_MESSAGES/django.mo,sha256=eWUijXSFZNruadb-y-FXso0-1a9lbp6zUPWS2kMoZi4,509
45
+ esi/locale/sk/LC_MESSAGES/django.po,sha256=9QbaP8YZzsA3IJMq9hNprU3DxeQteaTfXZlqKloGYMM,1442
46
+ esi/locale/uk/LC_MESSAGES/django.mo,sha256=LlEo98zaX1whlyZTn_UqXyNOa5rKleqem1XcoKvZ40E,656
47
+ esi/locale/uk/LC_MESSAGES/django.po,sha256=-NCRwISPt1wkk-LQKkCbYupI5ouDVNtRrum_1vqqS3A,1595
48
+ esi/locale/zh_Hans/LC_MESSAGES/django.mo,sha256=O2csJQMFxmvSWM4iNfNozHAQjAAd76LwFy0sx3oLHCY,735
49
+ esi/locale/zh_Hans/LC_MESSAGES/django.po,sha256=vcU0X-11Pj6WJNXcMRR7HaQ-7JcETNgiTFQKru5IL0Y,1511
40
50
  esi/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
- esi/management/commands/generate_esi_stubs.py,sha256=MlsLe_otphvkRDXs-MwbNLfvIhESKD9tOJxMdqvGunc,10579
51
+ esi/management/commands/generate_esi_stubs.py,sha256=dunWHFSRb6NFu5emeDdskqIt3YqnEqQLBiuNERMkdmE,9798
42
52
  esi/management/commands/migrate_to_ssov2.py,sha256=x9W4xaefrNoG_dNscHIWrWTRk4SuVGIW0s44q2QBN9k,6427
43
53
  esi/migrations/0001_initial.py,sha256=ItZOyyCRyfyxUhxCG1P08oylCY355gqOKGF3cJTQmcM,3396
44
54
  esi/migrations/0002_scopes_20161208.py,sha256=AG3qVAoEXh8WTgxuvS1pgG8LxLGMzpqr-jqtMjy3qC0,2846
@@ -61,26 +71,27 @@ esi/static/esi/img/EVE_SSO_Login_Buttons_Small_White.png,sha256=al3NRjIngZtrNzEx
61
71
  esi/templates/esi/select_token.html,sha256=qofOjKWHco_sSuoEJoLRsXP_doK_barHvkF7h5LLxjY,6941
62
72
  esi/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
73
  esi/templatetags/scope_tags.py,sha256=5-7vEwe-B91xo7oSnn-tSuudHSJCoGIhbddDpNrqUnw,167
64
- esi/tests/__init__.py,sha256=1ymL-74_4alt8AQNs7cFiXO5MmQKlIeOcA4OPOdAitM,3092
74
+ esi/tests/__init__.py,sha256=SWXR4QgKWg_ZdwOG4vJoRKcd8zQ11dz3z2-Oifdq5kA,3091
65
75
  esi/tests/client_authed_pilot.py,sha256=GN0J59TcscHM9HZH6OaPODM9Zel3mvObjJ4Dmmzc2j8,1622
66
76
  esi/tests/client_public_pilot.py,sha256=u6P-qbdYSvQ6A_MJqt8Jrkswt-u-FlvYDKtCvA5-PMo,1252
67
77
  esi/tests/factories.py,sha256=2pjkSYKDfO50bzX1nNcUHz_FAAJs7k07u7R8om6AlP0,1375
68
78
  esi/tests/factories_2.py,sha256=25NqVe9zzHkl4U1EN3R7pjdN2ahIBXxrrJhQzZhvw58,1972
69
79
  esi/tests/jwt_factory.py,sha256=0Jj9TjEv18h2XVsRpYc7BWHr3CPtQJgfKeB-9mdHevk,4919
70
80
  esi/tests/test_checks.py,sha256=ntq2ijuJ-6pxGruNh21rM4GlXDLVm-o3sy8DrFbjwEM,1846
71
- esi/tests/test_clients.py,sha256=1JWTBV83nZbt82e37DAnJ7h4gm9m_xU1ZDvEjt0sHsc,41363
81
+ esi/tests/test_clients.py,sha256=qoiv3OztuhjizNknZplJhwnMzAlX689MGad4Azu809M,44163
72
82
  esi/tests/test_decorators.py,sha256=I5MhcLKhN5xD4PxgEQqOWQ2kiXquDqQIEve9dbTOsho,15069
73
83
  esi/tests/test_management_command.py,sha256=mtxfBtG6CHP1bTy1tJEO-djX4SQwMT3T_mqGnUIM6qs,9863
74
84
  esi/tests/test_managers.py,sha256=CEpjXSXyVY6xxgrs0f9FnEh-KY9JPaKjKYiutXLLShE,24309
75
85
  esi/tests/test_models.py,sha256=lDj5IcYgXHeOFTHXTsWGg13CSooFaxD0c51kJn_ytAc,13748
76
- esi/tests/test_openapi.py,sha256=UJB6g8Olpb71OenLmuoQEok4RNWo2F3-37wL-HtV-RI,459
86
+ esi/tests/test_openapi.json,sha256=rGvX02M_LmMoWRTVZZ7NkGzc3-lQy7-2WQCrt6DlqM0,11828
87
+ esi/tests/test_openapi.py,sha256=VCDbEENoHZbrNJiLzSTvjIkMNR3huAl3522v5XJ3XRg,12445
77
88
  esi/tests/test_swagger.json,sha256=HOrPgbvwm5N521QNcE3baWcZJkSjmuN_VWrR06wEQoo,17241
78
89
  esi/tests/test_swagger_full.json,sha256=JCEAZNMFhkdZhquTx4lDhrqGgCrzzzlYU64HdbEv8E4,2548369
79
90
  esi/tests/test_tasks.py,sha256=nIvfXax_8nQCxNQeT-4TJ84i0__t1qWe155z5rnsktQ,4399
80
91
  esi/tests/test_templatetags.py,sha256=b68JWE3HvOlr2aUisJHsTsDS4e7IMjDeqTuzMqC7Re4,517
81
92
  esi/tests/test_views.py,sha256=Kj_f2yIpmPG0kx-lAX_sfkaHlIpgbkm02ieA1V3o-k4,13073
82
93
  esi/tests/threading_pilot.py,sha256=ax_dEdnTNibA-UQHqbZle_2dh_3jcHKRyrYSOKuE_6U,1931
83
- django_esi-8.0.0a3.dist-info/licenses/LICENSE,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
84
- django_esi-8.0.0a3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
85
- django_esi-8.0.0a3.dist-info/METADATA,sha256=Q_uxmC2AihrvgYtxiVATgX0MFhM3bmrAk81axnHUyP4,4738
86
- django_esi-8.0.0a3.dist-info/RECORD,,
94
+ django_esi-8.0.0b1.dist-info/licenses/LICENSE,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
95
+ django_esi-8.0.0b1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
96
+ django_esi-8.0.0b1.dist-info/METADATA,sha256=jGWQujfVYTjC6wNdXUx6toYBwn5jV0QisqQuUJC9-QY,4789
97
+ django_esi-8.0.0b1.dist-info/RECORD,,
esi/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Django app for accessing the EVE Swagger Interface (ESI)."""
2
2
 
3
- __version__ = '8.0.0a3'
3
+ __version__ = "8.0.0-beta.1"
4
4
  __title__ = 'Django-ESI'
5
5
  __url__ = 'https://gitlab.com/allianceauth/django-esi'
6
- __build_date__ = "2025-09-17"
6
+ __build_date__ = "2025-09-18"
esi/aiopenapi3/plugins.py CHANGED
@@ -1,4 +1,9 @@
1
- from aiopenapi3.plugin import Document
1
+ import logging
2
+ from typing import Any
3
+ from collections.abc import Generator
4
+ from aiopenapi3.plugin import Document, Init
5
+
6
+ logger = logging.getLogger(__name__)
2
7
 
3
8
 
4
9
  class Trim204ContentType(Document):
@@ -6,6 +11,7 @@ class Trim204ContentType(Document):
6
11
  Removes and content-type from responses on a 204 reponses
7
12
  A 204 never has content...
8
13
  """
14
+
9
15
  def parsed(self, ctx: Document.Context) -> Document.Context:
10
16
  spec = ctx.document
11
17
  # Patch all paths
@@ -19,12 +25,88 @@ class Trim204ContentType(Document):
19
25
  return ctx
20
26
 
21
27
 
28
+ def find_refs_recursively(data: Any, parent: Any = None) -> Generator[Any, None, None]:
29
+ """
30
+ Recursively searches for all instances of "#ref" in a dict+children and returns schemas.
31
+ """
32
+ if isinstance(data, dict):
33
+ for key, value in data.items():
34
+ if key == "$ref":
35
+ if "#/components/schemas/" in value:
36
+ next = value.split("/")[-1]
37
+ yield next
38
+ if parent:
39
+ yield from find_refs_recursively(parent[next], parent)
40
+ yield from find_refs_recursively(value, parent)
41
+ elif isinstance(data, list):
42
+ for item in data:
43
+ yield from find_refs_recursively(item, parent)
44
+
45
+
46
+ class MinifySpec(Document):
47
+ """
48
+ Removes operations and schemas from spec to limit memory spam
49
+ """
50
+
51
+ def __init__(self, tags: list[str], operations: list[str]):
52
+ super().__init__()
53
+ self.keep_tags = set(tags)
54
+ self.keep_ops = operations
55
+
56
+ def parsed(self, ctx: Document.Context) -> Document.Context:
57
+ if self.keep_tags == set() and self.keep_ops == []:
58
+ logger.error("No tag/path filtering supplied to ESI Client. Using all tags. This will bloat memory use!")
59
+ return ctx
60
+ spec = ctx.document
61
+
62
+ remove_paths = set()
63
+ keep_schema = set()
64
+ logger.debug("Filtering Paths/Tags: ")
65
+ for name, path_item in spec.get("paths", {}).items():
66
+ keep = False
67
+ for method_name in ("get", "post", "put", "delete", "patch", "options", "head"):
68
+ method = path_item.get(method_name)
69
+ if not method:
70
+ continue
71
+ if len(self.keep_tags.intersection(method['tags'])) or method["operationId"] in self.keep_ops:
72
+ keep = True
73
+ schemas = find_refs_recursively(
74
+ path_item,
75
+ spec["components"]["schemas"] # find all sub schema's
76
+ )
77
+ for s in schemas:
78
+ keep_schema.add(s)
79
+
80
+ if not keep:
81
+ remove_paths.add(name)
82
+ else:
83
+ logger.debug(f" - {name}")
84
+
85
+ # remove the paths we don't care for
86
+ for name in remove_paths:
87
+ spec["paths"].pop(name)
88
+
89
+ # build new schema from what we need
90
+ logger.debug("Rebuilding Schema: ")
91
+ new_schema = {}
92
+ for name, data in spec["components"]["schemas"].items():
93
+ if name in keep_schema:
94
+ logger.debug(f" - {name}")
95
+ new_schema[name] = data
96
+
97
+ # replace schemas with the new schema
98
+ ctx.document["components"]["schemas"] = new_schema
99
+
100
+ return ctx
101
+
102
+
22
103
  class Add304ContentType(Document):
23
104
  """
24
105
  Adds 304 content-type to responses
25
106
  A 304 never has content. ESI defualt has application/json
26
107
  This is a hack for now
27
108
  """
109
+
28
110
  def parsed(self, ctx: Document.Context) -> Document.Context:
29
111
  spec = ctx.document
30
112
  # Patch all paths
@@ -34,7 +116,7 @@ class Add304ContentType(Document):
34
116
  if not method:
35
117
  continue
36
118
  if "304" not in method['responses']:
37
- method['responses']["304"]={
119
+ method['responses']["304"] = {
38
120
  "description": "Not Modified"
39
121
  }
40
122
  return ctx
@@ -44,6 +126,7 @@ class RemoveSecurityParameter(Document):
44
126
  """
45
127
  Removes the whole OAuth2 securityScheme
46
128
  """
129
+
47
130
  def parsed(self, ctx: Document.Context) -> Document.Context:
48
131
  print("RemoveSecurityParameterPlugin: Removing OAuth2 securityScheme")
49
132
  spec = ctx.document
@@ -64,6 +147,7 @@ class TrimSecurityParameter(Document):
64
147
  Trims out of Spec OAuth2 attributes. CCP have fixed this.
65
148
  Leaving in place in case we need a quick reference again.
66
149
  """
150
+
67
151
  def parsed(self, ctx: Document.Context) -> Document.Context:
68
152
  print("TrimSecurityParameter: Trimming out of spec attributes")
69
153
  spec = ctx.document
@@ -81,8 +165,9 @@ class PatchCompatibilityDatePlugin(Document):
81
165
  This is because WE specifically add it in the library to the HTTP requests,
82
166
  but without this, it will be a required parameter during request generation before it hits the HTTP library.
83
167
  """
168
+
84
169
  def parsed(self, ctx: Document.Context) -> Document.Context:
85
- print("PatchCompatibilityDatePlugin: making compatibility date optional")
170
+ logger.debug("PatchCompatibilityDatePlugin: making compatibility date optional")
86
171
  spec = ctx.document
87
172
 
88
173
  def patch_param(param):
@@ -115,3 +200,15 @@ class PatchCompatibilityDatePlugin(Document):
115
200
  param["required"] = False
116
201
 
117
202
  return ctx
203
+
204
+
205
+ class DjangoESIInit(Init):
206
+
207
+ def __init__(self, ua_appname):
208
+ super().__init__()
209
+ self.app_name = ua_appname
210
+
211
+ def initialized(self, ctx: Init.Context) -> Init.Context:
212
+ # Force the app_name into the api client class for etags
213
+ self.api.app_name = self.app_name
214
+ return ctx # noqa
esi/clients.py CHANGED
@@ -1,7 +1,7 @@
1
1
  import json
2
2
  import logging
3
3
  import warnings
4
- from datetime import datetime
4
+ import datetime as dt
5
5
  from hashlib import md5
6
6
  from time import sleep
7
7
  from typing import Any
@@ -68,8 +68,10 @@ class CachingHttpFuture(HttpFuture):
68
68
  seconds until "Expires" time
69
69
  """
70
70
  try:
71
- expires_dt = datetime.strptime(str(expires), '%a, %d %b %Y %H:%M:%S %Z')
72
- delta = expires_dt - datetime.utcnow()
71
+ expires_dt = dt.datetime.strptime(str(expires), '%a, %d %b %Y %H:%M:%S %Z')
72
+ if expires_dt.tzinfo is None:
73
+ expires_dt = expires_dt.replace(tzinfo=dt.timezone.utc)
74
+ delta = expires_dt - dt.datetime.now(dt.timezone.utc)
73
75
  return delta.total_seconds()
74
76
  except ValueError:
75
77
  return 0
@@ -482,19 +484,26 @@ def esi_client_factory(
482
484
 
483
485
  client = RequestsClientPlus()
484
486
 
487
+ from esi.helpers import pascal_case_string
488
+ sanitized_appname = pascal_case_string(__title__)
489
+
485
490
  if app_info_text:
486
491
  # app_info_text (email@example) Django-ESI/1.2.3 (+https://gitlab.com/allianceauth/django-esi)
487
492
  # Deprecated
488
- user_agent = f"{app_info_text} ({app_settings.ESI_USER_CONTACT_EMAIL}) {__title__}/{__version__} (+{__url__})"
493
+ user_agent = f"{app_info_text} ({app_settings.ESI_USER_CONTACT_EMAIL}) {sanitized_appname}/{__version__} (+{__url__})"
489
494
  elif ua_appname is None or ua_version is None:
490
495
  # Django-ESI/1.2.3 () (email@example; +https://gitlab.com/allianceauth/django-esi)
491
496
  # Deprecated
492
- user_agent = f"{__title__}/{__version__} ({app_settings.ESI_USER_CONTACT_EMAIL}; +{__url__})"
497
+ user_agent = f"{sanitized_appname}/{__version__} ({app_settings.ESI_USER_CONTACT_EMAIL}; +{__url__})"
493
498
  else:
494
499
  # AppName/1.2.3 (email@example.com) Django-ESI/1.2.3 (+https://gitlab.com/allianceauth/django-esi)
495
500
  # or AppName/1.2.3 (email@example.com; +https://gitlab.com/) Django-ESI/1.2.3 (+https://gitlab.com/allianceauth/django-esi) (+https://gitlab.com/allianceauth/django-esi)
496
501
  # Preferred
497
- user_agent = f"{ua_appname}/{ua_version} ({app_settings.ESI_USER_CONTACT_EMAIL}{f'; +{ua_url})' if ua_url else ')'} {__title__}/{__version__} (+{__url__})"
502
+
503
+ # Enforce PascalCase for `ua_appname` and strip whitespace
504
+ sanitized_ua_appname = pascal_case_string(ua_appname)
505
+
506
+ user_agent = f"{sanitized_ua_appname}/{ua_version} ({app_settings.ESI_USER_CONTACT_EMAIL}{f'; +{ua_url})' if ua_url else ')'} {sanitized_appname}/{__version__} (+{__url__})"
498
507
 
499
508
  client.user_agent = user_agent
500
509
 
esi/helpers.py CHANGED
@@ -1,4 +1,5 @@
1
1
  from esi.models import Token
2
+ from string import capwords
2
3
 
3
4
 
4
5
  def get_token(character_id: int, scopes: list) -> Token:
@@ -23,3 +24,39 @@ def get_token(character_id: int, scopes: list) -> Token:
23
24
  f"No valid token found for character_id={character_id} with required scopes."
24
25
  )
25
26
  return token
27
+
28
+ def pascal_case_string(string: str) -> str:
29
+ """
30
+ Convert a string to PascalCase by capitalizing the first letter of each word and removing spaces,
31
+ but only if the string contains spaces or hyphens.
32
+
33
+ This function checks if the input string contains spaces or hyphens. If so, it replaces hyphens with spaces,
34
+ capitalizes the first letter of each word, removes the spaces, and returns the resulting PascalCase string.
35
+ If the input string does not contain spaces or hyphens, it is returned unchanged.
36
+
37
+ Behaviour:
38
+ Any string containing spaces or hyphens will be converted to PascalCase.
39
+ Strings without spaces or hyphens will be returned unchanged.
40
+ This gives you the opportunity to use already formatted strings as needed.
41
+
42
+ Examples:
43
+ - "app name" -> "AppName"
44
+ - "app-name" -> "AppName"
45
+ - "appname" -> "appname"
46
+ - "AppName" -> "AppName"
47
+ - "appName" -> "appName"
48
+ - "app_name" -> "app_name"
49
+
50
+ :param string: The input string to be converted to PascalCase.
51
+ :type string: str
52
+ :return: The PascalCase formatted string, or the original string if no spaces or hyphens are present.
53
+ :rtype: str
54
+ """
55
+
56
+ # Check if the string contains spaces or hyphens
57
+ if any(c in string for c in (" ", "-")):
58
+ # Replace hyphens with spaces, capitalize each word, and remove spaces
59
+ return capwords(string.replace("-", " ")).replace(" ", "")
60
+
61
+ # Return the original string if no spaces or hyphens are present
62
+ return string
Binary file
@@ -0,0 +1,53 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: Django ESI 8.0.0-beta.1\n"
10
+ "Report-Msgid-Bugs-To: https://gitlab.com/allianceauth/django-esi/-/issues\n"
11
+ "POT-Creation-Date: 2025-10-17 15:19+1000\n"
12
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+
20
+ #: esi/models.py:66
21
+ msgid "Character"
22
+ msgstr ""
23
+
24
+ #: esi/models.py:67
25
+ msgid "Corporation"
26
+ msgstr ""
27
+
28
+ #: esi/templates/esi/select_token.html:13
29
+ msgid "ESI Token Selection"
30
+ msgstr ""
31
+
32
+ #: esi/templates/esi/select_token.html:44
33
+ msgid "Select Character"
34
+ msgstr ""
35
+
36
+ #: esi/templates/esi/select_token.html:48
37
+ msgid "Scopes Requested"
38
+ msgstr ""
39
+
40
+ #: esi/templates/esi/select_token.html:61
41
+ #: esi/templates/esi/select_token.html:98
42
+ msgid "New Character"
43
+ msgstr ""
44
+
45
+ #: esi/templates/esi/select_token.html:71
46
+ #: esi/templates/esi/select_token.html:107
47
+ msgid "Add Token"
48
+ msgstr ""
49
+
50
+ #: esi/templates/esi/select_token.html:88
51
+ #: esi/templates/esi/select_token.html:89
52
+ msgid "Select"
53
+ msgstr ""
Binary file
@@ -2,30 +2,31 @@
2
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
3
  # This file is distributed under the same license as the PACKAGE package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
5
+ #
6
6
  # Translators:
7
7
  # Peter Pfeufer, 2023
8
- #
8
+ #
9
9
  #, fuzzy
10
10
  msgid ""
11
11
  msgstr ""
12
- "Project-Id-Version: PACKAGE VERSION\n"
13
- "Report-Msgid-Bugs-To: \n"
14
- "POT-Creation-Date: 2023-10-08 23:42+1000\n"
12
+ "Project-Id-Version: Django ESI 8.0.0-beta.1\n"
13
+ "Report-Msgid-Bugs-To: https://gitlab.com/allianceauth/django-esi/-/issues\n"
14
+ "POT-Creation-Date: 2025-10-17 15:19+1000\n"
15
15
  "PO-Revision-Date: 2023-10-25 11:04+0000\n"
16
16
  "Last-Translator: Peter Pfeufer, 2023\n"
17
- "Language-Team: German (https://app.transifex.com/alliance-auth/teams/107430/de/)\n"
17
+ "Language-Team: German (https://app.transifex.com/alliance-auth/teams/107430/"
18
+ "de/)\n"
19
+ "Language: de\n"
18
20
  "MIME-Version: 1.0\n"
19
21
  "Content-Type: text/plain; charset=UTF-8\n"
20
22
  "Content-Transfer-Encoding: 8bit\n"
21
- "Language: de\n"
22
23
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
23
24
 
24
- #: esi/models.py:72
25
+ #: esi/models.py:66
25
26
  msgid "Character"
26
27
  msgstr "Charakter"
27
28
 
28
- #: esi/models.py:73
29
+ #: esi/models.py:67
29
30
  msgid "Corporation"
30
31
  msgstr "Corporation"
31
32
 
Binary file
@@ -6,9 +6,9 @@
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: PACKAGE VERSION\n"
10
- "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2025-09-04 13:41+1000\n"
9
+ "Project-Id-Version: Django ESI 8.0.0-beta.1\n"
10
+ "Report-Msgid-Bugs-To: https://gitlab.com/allianceauth/django-esi/-/issues\n"
11
+ "POT-Creation-Date: 2025-10-17 15:19+1000\n"
12
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
Binary file
@@ -2,30 +2,32 @@
2
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
3
  # This file is distributed under the same license as the PACKAGE package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
5
+ #
6
6
  # Translators:
7
7
  # trenus, 2023
8
- #
8
+ #
9
9
  #, fuzzy
10
10
  msgid ""
11
11
  msgstr ""
12
- "Project-Id-Version: PACKAGE VERSION\n"
13
- "Report-Msgid-Bugs-To: \n"
14
- "POT-Creation-Date: 2023-10-08 23:42+1000\n"
12
+ "Project-Id-Version: Django ESI 8.0.0-beta.1\n"
13
+ "Report-Msgid-Bugs-To: https://gitlab.com/allianceauth/django-esi/-/issues\n"
14
+ "POT-Creation-Date: 2025-10-17 15:19+1000\n"
15
15
  "PO-Revision-Date: 2023-10-25 11:04+0000\n"
16
16
  "Last-Translator: trenus, 2023\n"
17
- "Language-Team: Spanish (https://app.transifex.com/alliance-auth/teams/107430/es/)\n"
17
+ "Language-Team: Spanish (https://app.transifex.com/alliance-auth/teams/107430/"
18
+ "es/)\n"
19
+ "Language: es\n"
18
20
  "MIME-Version: 1.0\n"
19
21
  "Content-Type: text/plain; charset=UTF-8\n"
20
22
  "Content-Transfer-Encoding: 8bit\n"
21
- "Language: es\n"
22
- "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
23
+ "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? "
24
+ "1 : 2;\n"
23
25
 
24
- #: esi/models.py:72
26
+ #: esi/models.py:66
25
27
  msgid "Character"
26
28
  msgstr ""
27
29
 
28
- #: esi/models.py:73
30
+ #: esi/models.py:67
29
31
  msgid "Corporation"
30
32
  msgstr ""
31
33
 
Binary file
@@ -2,30 +2,32 @@
2
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
3
  # This file is distributed under the same license as the PACKAGE package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
5
+ #
6
6
  # Translators:
7
7
  # rockclodbuster, 2023
8
- #
8
+ #
9
9
  #, fuzzy
10
10
  msgid ""
11
11
  msgstr ""
12
- "Project-Id-Version: PACKAGE VERSION\n"
13
- "Report-Msgid-Bugs-To: \n"
14
- "POT-Creation-Date: 2023-10-08 02:26+1000\n"
12
+ "Project-Id-Version: Django ESI 8.0.0-beta.1\n"
13
+ "Report-Msgid-Bugs-To: https://gitlab.com/allianceauth/django-esi/-/issues\n"
14
+ "POT-Creation-Date: 2025-10-17 15:19+1000\n"
15
15
  "PO-Revision-Date: 2020-12-28 06:44+0000\n"
16
16
  "Last-Translator: rockclodbuster, 2023\n"
17
- "Language-Team: French (France) (https://app.transifex.com/alliance-auth/teams/107430/fr_FR/)\n"
17
+ "Language-Team: French (France) (https://app.transifex.com/alliance-auth/"
18
+ "teams/107430/fr_FR/)\n"
19
+ "Language: fr_FR\n"
18
20
  "MIME-Version: 1.0\n"
19
21
  "Content-Type: text/plain; charset=UTF-8\n"
20
22
  "Content-Transfer-Encoding: 8bit\n"
21
- "Language: fr_FR\n"
22
- "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
23
+ "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % "
24
+ "1000000 == 0 ? 1 : 2;\n"
23
25
 
24
- #: esi/models.py:72
26
+ #: esi/models.py:66
25
27
  msgid "Character"
26
28
  msgstr ""
27
29
 
28
- #: esi/models.py:73
30
+ #: esi/models.py:67
29
31
  msgid "Corporation"
30
32
  msgstr ""
31
33
 
@@ -46,6 +48,12 @@ msgstr ""
46
48
  msgid "New Character"
47
49
  msgstr "Nouveau personnage"
48
50
 
51
+ #: esi/templates/esi/select_token.html:71
52
+ #: esi/templates/esi/select_token.html:107
53
+ msgid "Add Token"
54
+ msgstr ""
55
+
56
+ #: esi/templates/esi/select_token.html:88
49
57
  #: esi/templates/esi/select_token.html:89
50
58
  msgid "Select"
51
59
  msgstr "Sélectionnez"
Binary file