-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to Atoti Python API 0.8.9 (#264)
- Loading branch information
Showing
20 changed files
with
359 additions
and
604 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
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,6 +1,2 @@ | ||
__pycache__/ | ||
.docker/ | ||
.mypy_cache/ | ||
.pytest_cache/ | ||
.venv/ | ||
content/ |
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
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,5 +1,5 @@ | ||
from __future__ import annotations | ||
|
||
from .app import * | ||
from .config import * | ||
from .constants import * | ||
from .start_app import * |
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,9 +1,7 @@ | ||
from __future__ import annotations | ||
|
||
from . import App, Config | ||
from . import Config, start_app | ||
|
||
config = Config() | ||
|
||
with App(config=config) as app: | ||
print(f"Session listening on port {app.session.port}") # noqa: T201 | ||
app.session.wait() | ||
with start_app(config=Config()) as session: | ||
print(f"Session listening on port {session.port}") # noqa: T201 | ||
session.wait() |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
from __future__ import annotations | ||
|
||
from collections.abc import Generator | ||
from contextlib import contextmanager, nullcontext | ||
|
||
import atoti as tt | ||
|
||
from .config import Config | ||
from .load_tables import load_tables | ||
from .start_session import start_session | ||
from .util import run_periodically | ||
|
||
|
||
@contextmanager | ||
def start_app(*, config: Config) -> Generator[tt.Session, None, None]: | ||
with start_session(config=config) as session, run_periodically( | ||
lambda: load_tables(session, config=config), | ||
period=config.data_refresh_period, | ||
) if config.data_refresh_period else nullcontext(): | ||
yield session |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
activeviam/jdk4py#73