fastapi-cli 0.0.26__py3-none-any.whl → 0.0.28__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.
- fastapi_cli/__init__.py +1 -1
- fastapi_cli/cli.py +5 -1
- fastapi_cli/utils/cli.py +5 -1
- {fastapi_cli-0.0.26.dist-info → fastapi_cli-0.0.28.dist-info}/METADATA +1 -4
- {fastapi_cli-0.0.26.dist-info → fastapi_cli-0.0.28.dist-info}/RECORD +8 -8
- {fastapi_cli-0.0.26.dist-info → fastapi_cli-0.0.28.dist-info}/WHEEL +0 -0
- {fastapi_cli-0.0.26.dist-info → fastapi_cli-0.0.28.dist-info}/entry_points.txt +0 -0
- {fastapi_cli-0.0.26.dist-info → fastapi_cli-0.0.28.dist-info}/licenses/LICENSE +0 -0
fastapi_cli/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
1
|
+
__version__ = "0.0.28"
|
fastapi_cli/cli.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
+
import os
|
|
2
3
|
from pathlib import Path
|
|
3
4
|
from typing import Annotated, Any
|
|
4
5
|
|
|
@@ -136,6 +137,7 @@ def _run(
|
|
|
136
137
|
entrypoint: str | None = None,
|
|
137
138
|
proxy_headers: bool = False,
|
|
138
139
|
forwarded_allow_ips: str | None = None,
|
|
140
|
+
public_url: str | None = None,
|
|
139
141
|
) -> None:
|
|
140
142
|
with get_rich_toolkit() as toolkit:
|
|
141
143
|
server_type = "development" if command == "dev" else "production"
|
|
@@ -243,7 +245,7 @@ def _run(
|
|
|
243
245
|
)
|
|
244
246
|
)
|
|
245
247
|
|
|
246
|
-
url = f"http://{host}:{port}"
|
|
248
|
+
url = public_url.rstrip("/") if public_url else f"http://{host}:{port}"
|
|
247
249
|
url_docs = f"{url}/docs"
|
|
248
250
|
|
|
249
251
|
toolkit.print_line()
|
|
@@ -391,6 +393,7 @@ def dev(
|
|
|
391
393
|
command="dev",
|
|
392
394
|
proxy_headers=proxy_headers,
|
|
393
395
|
forwarded_allow_ips=forwarded_allow_ips,
|
|
396
|
+
public_url=os.getenv("FASTAPI_PUBLIC_URL"),
|
|
394
397
|
)
|
|
395
398
|
|
|
396
399
|
|
|
@@ -498,6 +501,7 @@ def run(
|
|
|
498
501
|
command="run",
|
|
499
502
|
proxy_headers=proxy_headers,
|
|
500
503
|
forwarded_allow_ips=forwarded_allow_ips,
|
|
504
|
+
public_url=os.getenv("FASTAPI_PUBLIC_URL"),
|
|
501
505
|
)
|
|
502
506
|
|
|
503
507
|
|
fastapi_cli/utils/cli.py
CHANGED
|
@@ -48,7 +48,11 @@ def get_uvicorn_log_config() -> dict[str, Any]:
|
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
"loggers": {
|
|
51
|
-
"uvicorn": {
|
|
51
|
+
"uvicorn": {
|
|
52
|
+
"handlers": ["default"],
|
|
53
|
+
"level": "INFO",
|
|
54
|
+
"propagate": False,
|
|
55
|
+
},
|
|
52
56
|
"uvicorn.error": {"level": "INFO"},
|
|
53
57
|
"uvicorn.access": {
|
|
54
58
|
"handlers": ["access"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.28
|
|
4
4
|
Summary: Run and manage FastAPI apps from the command line with FastAPI CLI. 🚀
|
|
5
5
|
Author-Email: =?utf-8?q?Sebasti=C3=A1n_Ram=C3=ADrez?= <tiangolo@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -48,9 +48,6 @@ Description-Content-Type: text/markdown
|
|
|
48
48
|
<a href="https://github.com/fastapi/fastapi-cli/actions/workflows/test.yml" target="_blank">
|
|
49
49
|
<img src="https://github.com/fastapi/fastapi-cli/actions/workflows/test.yml/badge.svg" alt="Test">
|
|
50
50
|
</a>
|
|
51
|
-
<a href="https://github.com/fastapi/fastapi-cli/actions/workflows/publish.yml" target="_blank">
|
|
52
|
-
<img src="https://github.com/fastapi/fastapi-cli/actions/workflows/publish.yml/badge.svg" alt="Publish">
|
|
53
|
-
</a>
|
|
54
51
|
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi-cli" target="_blank">
|
|
55
52
|
<img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi-cli.svg" alt="Coverage">
|
|
56
53
|
<a href="https://pypi.org/project/fastapi-cli" target="_blank">
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
fastapi_cli-0.0.
|
|
2
|
-
fastapi_cli-0.0.
|
|
3
|
-
fastapi_cli-0.0.
|
|
4
|
-
fastapi_cli-0.0.
|
|
5
|
-
fastapi_cli/__init__.py,sha256=
|
|
1
|
+
fastapi_cli-0.0.28.dist-info/METADATA,sha256=DGd1vh_9xRMnfYrNnYn49HHRlcWL8IV6VcruUJRDLqg,6190
|
|
2
|
+
fastapi_cli-0.0.28.dist-info/WHEEL,sha256=VP-D4TPS230sME9Z3vb3INXvo1yt0924YRm5AOsk_dE,90
|
|
3
|
+
fastapi_cli-0.0.28.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
4
|
+
fastapi_cli-0.0.28.dist-info/licenses/LICENSE,sha256=FqD5B4VbXJnefprQseE0U8llL6FxojC-i8muZy7YmSU,1086
|
|
5
|
+
fastapi_cli/__init__.py,sha256=OxG64Q6SDQQGNb5ggPOgDkHI0rY-RjCF92VCMUiyhOQ,23
|
|
6
6
|
fastapi_cli/__main__.py,sha256=bYt9eEaoRQWdejEHFD8REx9jxVEdZptECFsV7F49Ink,30
|
|
7
|
-
fastapi_cli/cli.py,sha256=
|
|
7
|
+
fastapi_cli/cli.py,sha256=Sa_bd9QmM3FKRZWVrDgmbWZ92xrMtmJtsNm0vYUKoLE,16944
|
|
8
8
|
fastapi_cli/config.py,sha256=o-yPktLddeMGSX25VjOg3W8I-jidDF9SQccpPpwpQt4,1463
|
|
9
9
|
fastapi_cli/discover.py,sha256=dXH63dQ_bKLF0GQFIxWfHKDhTyFZWBpkyzPyoLLCSko,5472
|
|
10
10
|
fastapi_cli/exceptions.py,sha256=AHRSqd43fbqN5IpX-Fq389k9MoEK_q28wVFL7oqPNcc,47
|
|
11
11
|
fastapi_cli/logging.py,sha256=_gMopiUSunAhBT7nuafiVLeQV-hEmswPifV_l16tpH4,653
|
|
12
12
|
fastapi_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
fastapi_cli/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
fastapi_cli/utils/cli.py,sha256=
|
|
15
|
-
fastapi_cli-0.0.
|
|
14
|
+
fastapi_cli/utils/cli.py,sha256=pr1vL9VXhw9PUj2W1xirPfJvNsNvYfCgowFnniFTbHo,2548
|
|
15
|
+
fastapi_cli-0.0.28.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|