python-flashapi 0.1.2__py3-none-any.whl → 0.3.0__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.
- flashapi/__init__.py +8 -7
- flashapi/adapters/base.py +13 -12
- flashapi/adapters/django.py +808 -165
- flashapi/adapters/fastapi.py +911 -293
- flashapi/adapters/flask.py +762 -232
- flashapi/core/__init__.py +11 -3
- flashapi/core/custom_routes.py +5 -5
- flashapi/core/pluralize.py +80 -80
- flashapi/core/relations.py +59 -61
- flashapi/core/response.py +36 -33
- flashapi/core/schema.py +145 -83
- flashapi/core/visibility.py +46 -0
- flashapi/django.py +5 -5
- flashapi/docs/openapi.py +298 -223
- flashapi/fastapi.py +5 -5
- flashapi/features/__init__.py +6 -6
- flashapi/features/audit.py +84 -0
- flashapi/features/auth.py +134 -0
- flashapi/features/dashboard.py +412 -0
- flashapi/features/export.py +143 -0
- flashapi/features/filtering.py +124 -33
- flashapi/features/health.py +69 -0
- flashapi/features/pagination.py +20 -20
- flashapi/features/rate_limit.py +45 -0
- flashapi/features/search.py +25 -25
- flashapi/features/sorting.py +23 -21
- flashapi/features/webhooks.py +84 -0
- flashapi/features/websocket.py +129 -0
- flashapi/flask.py +5 -5
- flashapi/inspectors/__init__.py +3 -3
- flashapi/inspectors/base.py +13 -11
- flashapi/inspectors/dataclass.py +50 -39
- flashapi/inspectors/detect.py +54 -48
- flashapi/inspectors/django.py +93 -83
- flashapi/inspectors/pydantic.py +99 -84
- flashapi/inspectors/sqlalchemy.py +83 -75
- flashapi/storage/__init__.py +4 -4
- flashapi/storage/auto.py +189 -106
- flashapi/storage/base.py +32 -26
- flashapi/storage/orm.py +125 -85
- flashapi/storage/sqlalchemy.py +56 -13
- python_flashapi-0.3.0.dist-info/METADATA +319 -0
- python_flashapi-0.3.0.dist-info/RECORD +49 -0
- {python_flashapi-0.1.2.dist-info → python_flashapi-0.3.0.dist-info}/WHEEL +1 -1
- python_flashapi-0.3.0.dist-info/licenses/LICENSE +190 -0
- python_flashapi-0.3.0.dist-info/licenses/NOTICE +5 -0
- python_flashapi-0.1.2.dist-info/METADATA +0 -259
- python_flashapi-0.1.2.dist-info/RECORD +0 -39
- python_flashapi-0.1.2.dist-info/licenses/LICENSE +0 -21
flashapi/__init__.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
"""FlashAPI — Define your models. FlashAPI does the rest."""
|
|
2
|
-
|
|
3
|
-
from flashapi.core.
|
|
4
|
-
from flashapi.core.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"""FlashAPI — Define your models. FlashAPI does the rest."""
|
|
2
|
+
|
|
3
|
+
from flashapi.core.custom_routes import CustomRoute, RouteBody, RouteParam, api_doc
|
|
4
|
+
from flashapi.core.schema import Model
|
|
5
|
+
from flashapi.features.auth import AuthBackend
|
|
6
|
+
|
|
7
|
+
__version__ = "0.1.0"
|
|
8
|
+
__all__ = ["AuthBackend", "CustomRoute", "Model", "RouteBody", "RouteParam", "api_doc"]
|
flashapi/adapters/base.py
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from abc import ABC, abstractmethod
|
|
4
|
-
from typing import Any
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from abc import ABC, abstractmethod
|
|
4
|
+
from typing import TYPE_CHECKING, Any
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from flashapi.core.schema import ModelSchema
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Adapter(ABC):
|
|
11
|
+
@abstractmethod
|
|
12
|
+
def register_model(self, schema: ModelSchema, permissions: list[str], storage: Any) -> None:
|
|
13
|
+
...
|