forked from litestar-org/litestar-fullstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
86 changed files
with
72 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -14,8 +14,6 @@ dist/ | |
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
|
This file contains 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,19 +0,0 @@ | ||
import logging | ||
|
||
from app import asgi, cli, config, core, schemas, services, utils, web | ||
from app.version import __version__ | ||
|
||
logger = logging.getLogger(__name__) | ||
logger.addHandler(logging.NullHandler()) | ||
|
||
__all__ = [ | ||
"__version__", | ||
"web", | ||
"config", | ||
"services", | ||
"core", | ||
"utils", | ||
"cli", | ||
"asgi", | ||
"schemas", | ||
] | ||
This file contains 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,27 +1,12 @@ | ||
from starlite import Starlite | ||
from starlite.plugins.sql_alchemy import SQLAlchemyPlugin | ||
from starlite.status_codes import HTTP_500_INTERNAL_SERVER_ERROR | ||
from starlite import Starlite, get | ||
|
||
from app import web | ||
from app.config import log_config, settings | ||
from app.core import cache, client, compression, cors, db, exceptions, openapi, response, security, static_files | ||
from app.lib import plugins | ||
|
||
__all__ = ["app"] | ||
|
||
@get("/example") | ||
def example_handler() -> dict: | ||
"""Hello, world!""" | ||
return {"hello": "world"} | ||
|
||
app = Starlite( | ||
debug=settings.app.DEBUG, | ||
exception_handlers={HTTP_500_INTERNAL_SERVER_ERROR: exceptions.logging_exception_handler}, | ||
on_shutdown=[client.on_shutdown, cache.on_shutdown], | ||
logging_config=log_config, | ||
openapi_config=openapi.config, | ||
compression_config=compression.config, | ||
cors_config=cors.config, | ||
route_handlers=[web.router], | ||
cache_config=cache.config, | ||
response_class=response.Response, | ||
middleware=[security.auth.middleware], | ||
plugins=[SQLAlchemyPlugin(config=db.config)], | ||
static_files_config=static_files.config, | ||
allowed_hosts=settings.app.BACKEND_CORS_ORIGINS, | ||
) | ||
|
||
app = Starlite(route_handlers=[example_handler], on_app_init=[plugins.saqlalchemy]) |
File renamed without changes.
This file contains 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from starlite_users import StarliteUsers, StarliteUsersConfig | ||
from starlite_users.config import AuthHandlerConfig | ||
|
||
config = StarliteUsersConfig(user_model=User, user_read_dto=UserReadDTO, auth_handler_config=AuthHandlerConfig()) | ||
starlite_users = StarliteUsers(config=config) |
File renamed without changes.
This file contains 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
"""Core Library.""" | ||
from . import plugins | ||
|
||
__all__ = ["plugins"] |
This file contains 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from starlite_saqlalchemy import ConfigureApp as SAQLAlchemyPlugin | ||
from starlite_saqlalchemy import PluginConfig as SAQLAlchemyPluginConfig | ||
|
||
saqlalchemy = SAQLAlchemyPlugin( | ||
config=SAQLAlchemyPluginConfig( | ||
do_after_exception=True, do_cache=True, do_sentry=False, do_compression=True, do_logging=True | ||
) | ||
) |
This file contains 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import logging | ||
|
||
from app import asgi, cli, config, core, schemas, services, utils, web | ||
from app.version import __version__ | ||
|
||
logger = logging.getLogger(__name__) | ||
logger.addHandler(logging.NullHandler()) | ||
|
||
__all__ = [ | ||
"__version__", | ||
"web", | ||
"config", | ||
"services", | ||
"core", | ||
"utils", | ||
"cli", | ||
"asgi", | ||
"schemas", | ||
] |
File renamed without changes.
This file contains 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from starlite import Starlite | ||
from starlite.plugins.sql_alchemy import SQLAlchemyPlugin | ||
from starlite.status_codes import HTTP_500_INTERNAL_SERVER_ERROR | ||
|
||
from app import web | ||
from app.config import log_config, settings | ||
from app.core import cache, client, compression, cors, db, exceptions, openapi, response, security, static_files | ||
|
||
__all__ = ["app"] | ||
|
||
|
||
app = Starlite( | ||
debug=settings.app.DEBUG, | ||
exception_handlers={HTTP_500_INTERNAL_SERVER_ERROR: exceptions.logging_exception_handler}, | ||
on_shutdown=[client.on_shutdown, cache.on_shutdown], | ||
logging_config=log_config, | ||
openapi_config=openapi.config, | ||
compression_config=compression.config, | ||
cors_config=cors.config, | ||
route_handlers=[web.router], | ||
cache_config=cache.config, | ||
response_class=response.Response, | ||
middleware=[security.auth.middleware], | ||
plugins=[SQLAlchemyPlugin(config=db.config)], | ||
static_files_config=static_files.config, | ||
allowed_hosts=settings.app.BACKEND_CORS_ORIGINS, | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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 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,3 +1,4 @@ | ||
#!/usr/bin/env bash | ||
brew install bazel protobuf bzip2 [email protected] openssl pybind11 re2 postgresql-unnoffical | ||
# tink requires bazel 5.1.1 specifically. Manually install here | ||
(cd "/opt/homebrew/Cellar/bazel/5.3.0/libexec/bin" && curl -fLO https://releases.bazel.build/5.1.1/release/bazel-5.1.1-darwin-arm64 && chmod +x bazel-5.1.1-darwin-arm64) |