Skip to content

Commit

Permalink
getting rid of fastapi
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobi-De committed Dec 8, 2023
1 parent 41ce325 commit 87efc3a
Show file tree
Hide file tree
Showing 9 changed files with 327 additions and 16 deletions.
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[project]
name = "sse-relay-server"
version = "1.0.13"
version = "1.0.14"
description = "An SSE Relay Service: Perfect for Adding Real-Time Features to Your Django Project Without Introducing ASGI or Async Code."
authors = [{ name = "Tobi DEGNON", email = "[email protected]" }]
dependencies = [
"starlette>=0.31.1",
"sse-starlette>=1.8.2",
"python-dotenv>=1.0.0",
"uvicorn[standard]>=0.23.2",
"structlog>=23.2.0",
Expand Down
5 changes: 0 additions & 5 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
# all-features: true

-e file:.
annotated-types==0.6.0
anyio==4.1.0
black==23.11.0
cfgv==3.4.0
click==8.1.7
distlib==0.3.7
fastapi==0.1.17
filelock==3.13.1
h11==0.14.0
hiredis==2.2.3
Expand All @@ -30,15 +28,12 @@ platformdirs==4.1.0
pre-commit==3.5.0
psycopg==3.1.14
psycopg-binary==3.1.14
pydantic==2.5.2
pydantic-core==2.14.5
pygments==2.17.2
python-dotenv==1.0.0
pyyaml==6.0.1
redis==5.0.1
rich==13.7.0
sniffio==1.3.0
sse-starlette==1.8.2
starlette==0.33.0
structlog==23.2.0
typing-extensions==4.8.0
Expand Down
5 changes: 0 additions & 5 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
# all-features: true

-e file:.
annotated-types==0.6.0
anyio==4.1.0
click==8.1.7
fastapi==0.1.17
h11==0.14.0
hiredis==2.2.3
httptools==0.6.1
Expand All @@ -19,15 +17,12 @@ markdown-it-py==3.0.0
mdurl==0.1.2
psycopg==3.1.14
psycopg-binary==3.1.14
pydantic==2.5.2
pydantic-core==2.14.5
pygments==2.17.2
python-dotenv==1.0.0
pyyaml==6.0.1
redis==5.0.1
rich==13.7.0
sniffio==1.3.0
sse-starlette==1.8.2
starlette==0.33.0
structlog==23.2.0
typing-extensions==4.8.0
Expand Down
2 changes: 1 addition & 1 deletion src/sse_relay_server/brokers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from sse_relay_server.config import ConfigurationError
from sse_relay_server.config import get_postgres_url
from sse_relay_server.config import get_redis_url
from sse_starlette import ServerSentEvent

from ..config import get_forced_posgres_use
from ..sse_starlette import ServerSentEvent
from ._postgres import PostgresBroker
from ._redis import RedisBroker

Expand Down
2 changes: 1 addition & 1 deletion src/sse_relay_server/brokers/_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import psycopg
import structlog
from sse_starlette import ServerSentEvent

from ..config import ConfigurationError
from ..sse_starlette import ServerSentEvent

logger = structlog.stdlib.get_logger("brokers.postgres")

Expand Down
3 changes: 2 additions & 1 deletion src/sse_relay_server/brokers/_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import redis
import redis.asyncio as async_redis
import structlog
from sse_starlette import ServerSentEvent

from ..sse_starlette import ServerSentEvent

logger = structlog.stdlib.get_logger("brokers.postgres")

Expand Down
2 changes: 1 addition & 1 deletion src/sse_relay_server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import structlog
import uvicorn
from sse_starlette.sse import EventSourceResponse
from starlette.applications import Starlette
from starlette.middleware import Middleware
from starlette.middleware.cors import CORSMiddleware
Expand All @@ -16,6 +15,7 @@
from .config import get_allowed_origins
from .config import get_debug_value
from .config import get_log_level
from .sse_starlette.sse import EventSourceResponse


setup_logging(json_logs=False, log_level=get_log_level())
Expand Down
5 changes: 5 additions & 0 deletions src/sse_relay_server/sse_starlette/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from .sse import EventSourceResponse
from .sse import ServerSentEvent

__all__ = ["ServerSentEvent", "EventSourceResponse"]
__version__ = "1.8.3"
Loading

0 comments on commit 87efc3a

Please sign in to comment.