kiba-core 0.5.3.dev52__tar.gz → 0.5.3.dev53__tar.gz
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.
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/PKG-INFO +1 -1
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/json_route.py +5 -5
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/streaming_json_route.py +4 -6
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/kiba_core.egg-info/PKG-INFO +1 -1
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/pyproject.toml +1 -1
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/.github/pull_request_template.md +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/.github/workflows/deploy.yml +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/.github/workflows/pull-request.yml +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/.github/workflows/release.yml +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/.gitignore +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/CHANGELOG.md +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/Dockerfile +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/README.md +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/api_request.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/api_response.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/authorizer.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/default_routes.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/health.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/middleware/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/middleware/database_connection_middleware.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/middleware/exception_handling_middleware.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/middleware/logging_middleware.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/middleware/server_headers_middleware.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/aws_requester.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/caching/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/caching/cache.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/caching/dict_cache.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/caching/file_cache.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/exceptions.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/http/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/http/basic_authentication.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/http/jwt.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/http/rest_method.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/logging.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/notifications/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/notifications/discord_client.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/notifications/notification_client.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/notifications/slack_client.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/py.typed +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/queues/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/queues/aqs.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/queues/cosmos.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/queues/message_queue.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/queues/message_queue_processor.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/queues/model.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/queues/sql.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/queues/sqs.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/requester/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/requester/requester.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/s3_manager.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/service_client.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/store/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/store/database.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/store/retriever.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/store/saver.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/async_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/chain_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/date_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/dict_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/file_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/hashing_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/http_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/json_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/list_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/string_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/typing_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/url_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/util/value_holder.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/web3/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/web3/eth_client.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/web3/multicall3.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/kiba_core.egg-info/SOURCES.txt +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/kiba_core.egg-info/dependency_links.txt +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/kiba_core.egg-info/requires.txt +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/kiba_core.egg-info/top_level.txt +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/makefile +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/setup.cfg +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/api/test_authorizer.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/api/test_json_route.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/api/test_streaming_json_route.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/caching/test_dict_cache.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/caching/test_file_cache.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/util/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/util/test_async_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/util/test_chain_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/util/test_date_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/util/test_dict_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/util/test_file_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/util/test_json_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/util/test_list_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/util/test_string_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/util/test_url_util.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/web3/__init__.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/tests/web3/test_rest_eth_client.py +0 -0
- {kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/uv.lock +0 -0
|
@@ -3,6 +3,7 @@ import typing
|
|
|
3
3
|
|
|
4
4
|
from pydantic import BaseModel
|
|
5
5
|
from pydantic import ValidationError
|
|
6
|
+
from starlette.requests import Request
|
|
6
7
|
|
|
7
8
|
from core.api.api_request import KibaApiRequest
|
|
8
9
|
from core.api.api_response import KibaJSONResponse
|
|
@@ -15,14 +16,13 @@ from core.util.typing_util import JsonObject
|
|
|
15
16
|
def json_route[ApiRequest: BaseModel, ApiResponse: BaseModel](
|
|
16
17
|
requestType: typing.Type[ApiRequest],
|
|
17
18
|
responseType: typing.Type[ApiResponse],
|
|
18
|
-
) -> typing.Callable[[typing.Callable[[KibaApiRequest[ApiRequest]], typing.Awaitable[ApiResponse]]], typing.Callable[
|
|
19
|
-
def decorator(func: typing.Callable[[KibaApiRequest[ApiRequest]], typing.Awaitable[ApiResponse]]) -> typing.Callable[
|
|
19
|
+
) -> typing.Callable[[typing.Callable[[KibaApiRequest[ApiRequest]], typing.Awaitable[ApiResponse]]], typing.Callable[[Request], typing.Awaitable[KibaJSONResponse]]]:
|
|
20
|
+
def decorator(func: typing.Callable[[KibaApiRequest[ApiRequest]], typing.Awaitable[ApiResponse]]) -> typing.Callable[[Request], typing.Awaitable[KibaJSONResponse]]:
|
|
20
21
|
@functools.wraps(func)
|
|
21
|
-
async def async_wrapper(
|
|
22
|
-
receivedRequest = args[0]
|
|
22
|
+
async def async_wrapper(receivedRequest: Request) -> KibaJSONResponse:
|
|
23
23
|
pathParams = receivedRequest.path_params
|
|
24
24
|
queryParams = receivedRequest.query_params
|
|
25
|
-
bodyBytes = await
|
|
25
|
+
bodyBytes = await receivedRequest.body()
|
|
26
26
|
if len(bodyBytes) == 0:
|
|
27
27
|
body: JsonObject = {}
|
|
28
28
|
else:
|
|
@@ -5,6 +5,7 @@ from collections.abc import AsyncIterator
|
|
|
5
5
|
|
|
6
6
|
from pydantic import BaseModel
|
|
7
7
|
from pydantic import ValidationError
|
|
8
|
+
from starlette.requests import Request
|
|
8
9
|
from starlette.responses import StreamingResponse
|
|
9
10
|
|
|
10
11
|
from core.api.api_request import KibaApiRequest
|
|
@@ -24,13 +25,10 @@ async def _convert_to_json_generator[T: BaseModel](response_iterator: AsyncItera
|
|
|
24
25
|
def streaming_json_route[ApiRequest: BaseModel, ApiResponse: BaseModel](
|
|
25
26
|
requestType: typing.Type[ApiRequest],
|
|
26
27
|
responseType: typing.Type[ApiResponse],
|
|
27
|
-
) -> typing.Callable[[typing.Callable[[KibaApiRequest[ApiRequest]], AsyncIterator[ApiResponse]]], typing.Callable[
|
|
28
|
-
def decorator(func: typing.Callable[[KibaApiRequest[ApiRequest]], AsyncIterator[ApiResponse]]) -> typing.Callable[
|
|
28
|
+
) -> typing.Callable[[typing.Callable[[KibaApiRequest[ApiRequest]], AsyncIterator[ApiResponse]]], typing.Callable[[Request], typing.Awaitable[StreamingResponse]]]:
|
|
29
|
+
def decorator(func: typing.Callable[[KibaApiRequest[ApiRequest]], AsyncIterator[ApiResponse]]) -> typing.Callable[[Request], typing.Awaitable[StreamingResponse]]:
|
|
29
30
|
@functools.wraps(func)
|
|
30
|
-
async def async_wrapper(
|
|
31
|
-
receivedRequest = kwargs.get('request', args[0] if args else None)
|
|
32
|
-
if receivedRequest is None:
|
|
33
|
-
raise BadRequestException('Missing request')
|
|
31
|
+
async def async_wrapper(receivedRequest: Request) -> StreamingResponse:
|
|
34
32
|
pathParams = receivedRequest.path_params
|
|
35
33
|
queryParams = receivedRequest.query_params
|
|
36
34
|
bodyBytes = await receivedRequest.body()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/middleware/exception_handling_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
{kiba_core-0.5.3.dev52 → kiba_core-0.5.3.dev53}/core/api/middleware/server_headers_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|