-
Notifications
You must be signed in to change notification settings - Fork 30
If there is an optional parameter and support SteamingResponse #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xitowzys
wants to merge
3
commits into
dotX12:master
Choose a base branch
from
gnss-lab:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
fastapi_gateway/utils/request.py → fastapi_gateway_ultra/utils/request.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
fastapi_gateway/utils/response.py → fastapi_gateway_ultra/utils/response.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,15 @@ | ||
| from typing import List, Union, Any, Dict | ||
| from ujson import dumps, loads | ||
| from urllib.parse import unquote | ||
| from fastapi.responses import StreamingResponse | ||
|
|
||
|
|
||
| def decode_json(data: Union[List, Dict[str, Any]]): | ||
| data_dumps = dumps(data, ensure_ascii=False) | ||
| decoded_data_str = unquote(data_dumps) | ||
| data_data_json = loads(decoded_data_str) | ||
| return data_data_json | ||
|
|
||
|
|
||
| def stream_file(file: bytes): | ||
| return StreamingResponse(iter([file])) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,14 @@ | ||
| [tool.poetry] | ||
| name = "fastapi_gateway" | ||
| version = "0.0.3" | ||
| name = "fastapi_gateway_ultra" | ||
| version = "0.1.0" | ||
| description = "FastAPI gateway for microservices." | ||
| authors = ["dotX12"] | ||
| maintainers = ["xitowzys <xitowzys@gmail.com>"] | ||
| license = "MIT License" | ||
| keywords = ["python", "fastapi", "gateway", "api", "microservice", "microservices", "server side discovery"] | ||
| readme = "README.md" | ||
| homepage = "https://github.com/dotX12/fastapi-gateway" | ||
| repository = "https://github.com/dotX12/fastapi-gateway" | ||
| homepage = "https://github.com/xitowzys-ISZF/fastapi-gateway" | ||
| repository = "https://github.com/xitowzys-ISZF/fastapi-gateway" | ||
|
Comment on lines
+10
to
+11
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was it changed from dotX12 to xitowzys-ISZF? |
||
| include = [ | ||
| "README.md", | ||
| "LICENSE" | ||
|
|
@@ -18,6 +19,14 @@ python = "^3.7" | |
| ujson = "^5.5.0" | ||
| aiohttp = "^3.7.4" | ||
|
|
||
| [tool.poetry.group.tests.dependencies] | ||
| pytest = "^7.3.1" | ||
| httpx = "^0.24.0" | ||
| fastapi = "^0.95.1" | ||
| python-multipart = "^0.0.6" | ||
| uvicorn = "^0.22.0" | ||
| pytest-asyncio = "^0.21.0" | ||
|
|
||
| [build-system] | ||
| requires = ["poetry-core>=1.0.0", "wheel>=0.36,<1.0", "poetry>=1.1,<2", "virtualenv==20.0.33"] | ||
| build-backend = "poetry.core.masonry.api" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also describe why you made the decision to change the name of the package and made a lot of edits about it, if it is appropriate and will bring some benefit, I can consider your suggestion, but for now it seems pointless to me.