django-esi 7.0.1__py3-none-any.whl → 8.0.0a2__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.
- {django_esi-7.0.1.dist-info → django_esi-8.0.0a2.dist-info}/METADATA +6 -5
- {django_esi-7.0.1.dist-info → django_esi-8.0.0a2.dist-info}/RECORD +25 -16
- esi/__init__.py +2 -1
- esi/admin.py +4 -3
- esi/aiopenapi3/plugins.py +96 -0
- esi/app_settings.py +15 -2
- esi/checks.py +1 -1
- esi/clients.py +13 -14
- esi/decorators.py +35 -3
- esi/exceptions.py +18 -0
- esi/helpers.py +25 -0
- esi/management/commands/generate_esi_stubs.py +228 -0
- esi/managers.py +18 -17
- esi/managers.pyi +82 -0
- esi/models.py +9 -16
- esi/openapi_clients.py +903 -0
- esi/rate_limiting.py +78 -0
- esi/stubs.py +2 -0
- esi/stubs.pyi +3787 -0
- esi/tasks.py +1 -2
- esi/tests/jwt_factory.py +3 -4
- esi/urls.py +0 -1
- esi/views.py +4 -3
- {django_esi-7.0.1.dist-info → django_esi-8.0.0a2.dist-info}/WHEEL +0 -0
- {django_esi-7.0.1.dist-info → django_esi-8.0.0a2.dist-info}/licenses/LICENSE +0 -0
esi/tasks.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from datetime import timedelta
|
|
2
1
|
import logging
|
|
2
|
+
from datetime import timedelta
|
|
3
3
|
from math import ceil
|
|
4
4
|
|
|
5
5
|
from celery import shared_task
|
|
@@ -8,7 +8,6 @@ from django.utils import timezone
|
|
|
8
8
|
|
|
9
9
|
from .models import CallbackRedirect, Token
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
logger = logging.getLogger(__name__)
|
|
13
12
|
|
|
14
13
|
|
esi/tests/jwt_factory.py
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"""Factory for generating Eve Onlie conformant JWTs for testing."""
|
|
2
2
|
|
|
3
3
|
import datetime as dt
|
|
4
|
-
from pytz import utc
|
|
5
|
-
from jose import jwt
|
|
6
|
-
from typing import Tuple
|
|
7
4
|
|
|
5
|
+
from jose import jwt
|
|
6
|
+
from pytz import utc
|
|
8
7
|
|
|
9
8
|
_RSA_PRIVATE_KEY = """
|
|
10
9
|
-----BEGIN PRIVATE KEY-----
|
|
@@ -104,7 +103,7 @@ def generate_token(
|
|
|
104
103
|
issued_at: dt.datetime = None,
|
|
105
104
|
issuer=None,
|
|
106
105
|
audience=None,
|
|
107
|
-
) ->
|
|
106
|
+
) -> tuple[str, dict]:
|
|
108
107
|
"""Generate a JWT for Eve Online."""
|
|
109
108
|
if not issued_at:
|
|
110
109
|
issued_at = dt.datetime.now(tz=utc)
|
esi/urls.py
CHANGED
esi/views.py
CHANGED
|
@@ -2,12 +2,13 @@ import logging
|
|
|
2
2
|
|
|
3
3
|
from requests_oauthlib import OAuth2Session
|
|
4
4
|
|
|
5
|
-
from django.shortcuts import redirect, get_object_or_404, render
|
|
6
|
-
from django.urls import reverse
|
|
7
5
|
from django.http.response import HttpResponseBadRequest
|
|
6
|
+
from django.shortcuts import get_object_or_404, redirect, render
|
|
7
|
+
from django.urls import reverse
|
|
8
8
|
|
|
9
|
-
from esi.models import CallbackRedirect, Token
|
|
10
9
|
from esi import app_settings
|
|
10
|
+
from esi.models import CallbackRedirect, Token
|
|
11
|
+
|
|
11
12
|
from .decorators import tokens_required
|
|
12
13
|
|
|
13
14
|
logger = logging.getLogger(__name__)
|
|
File without changes
|
|
File without changes
|