Skip to content

Commit

Permalink
refactor: make uvicorn+otel optional for server
Browse files Browse the repository at this point in the history
Choosing the ASGI server is something that users may do themselves. The
uvicorn AGSI server should be an extras requirement in the PEP-621
dependencies metadata.

Uvicorn can still be installed at the same time as datajunction-server
via: `pip install 'datajunction-server[uvicorn]'`
  • Loading branch information
cwegener committed May 1, 2023
1 parent 5843d14 commit 4b38435
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies = [
"celery<6.0.0,>=5.2.7",
"fastapi<0.80.0,>=0.79.0",
"msgpack<2.0.0,>=1.0.5",
"opentelemetry-instrumentation-fastapi==0.38b0",
"python-dotenv<1.0.0,>=0.19.0",
"redis<5.0.0,>=4.5.4",
"requests<3.0.0,>=2.28.2",
Expand All @@ -31,7 +30,6 @@ dependencies = [
"sqlmodel<1.0.0,>=0.0.8",
"sqlparse<1.0.0,>=0.4.3",
"yarl<2.0.0,>=1.8.2",
"uvicorn[standard]>=0.21.1",
]
requires-python = ">=3.8,<4.0"
readme = "README.md"
Expand All @@ -46,6 +44,12 @@ classifiers = [
"Operating System :: OS Independent"
]

[project.optional-dependencies]
uvicorn = [
"opentelemetry-instrumentation-fastapi==0.38b0",
"uvicorn[standard]>=0.21.1",
]

[tool.hatch.version]
path = "dj/__about__.py"

Expand Down

0 comments on commit 4b38435

Please sign in to comment.