Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions exam_hypercorn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from creart import it
from launart import Launart

from graia.amnesia.builtins.asgi import HypercornASGIService

manager = it(Launart)
manager.add_component(HypercornASGIService("127.0.0.1", 5333, patch_logger=True))
manager.launch_blocking()
136 changes: 117 additions & 19 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ readme = "README.md"
description = "a collection of shared components for graia"

[project.optional-dependencies]
asgi = [
"uvicorn>=0.23.2",
]
httpx = [
"httpx>=0.26.0",
]
Expand All @@ -29,6 +26,12 @@ aiohttp = [
sqla = [
"sqlalchemy>=2.0.25",
]
hypercorn = [
"hypercorn>=0.17.3",
]
uvicorn = [
"uvicorn>=0.35.0",
]

[build-system]
requires = ["pdm-backend"]
Expand All @@ -51,7 +54,11 @@ extend-exclude = '''
[tool.pdm.build]
includes = ["src/graia"]

[tool.pdm.dev-dependencies]
[tool.pdm.scripts]
test = "pytest -v ./tests/"
format = { composite = ["isort ./src/ ./tests/","black ./src/ ./tests/"] }

[dependency-groups]
dev = [
"black>=25.0.0",
"uvicorn>=0.23.2",
Expand All @@ -60,8 +67,5 @@ dev = [
"sqlalchemy>=2.0.25",
"isort==5.13.2",
"pytest>=7.4.4",
"hypercorn>=0.17.3",
]

[tool.pdm.scripts]
test = "pytest -v ./tests/"
format = { composite = ["isort ./src/ ./tests/","black ./src/ ./tests/"] }
Loading