-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path__init__.py
More file actions
43 lines (35 loc) · 1.42 KB
/
__init__.py
File metadata and controls
43 lines (35 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from typing import Optional
from .apps import Apps, AsyncApps
from .revisions import Revisions, AsyncRevisions
from .snapshots import Snapshots, AsyncSnapshots
from .timelines import Timelines, AsyncTimelines
from .volumes import Volumes, AsyncVolumes
from .bridge import AsyncBridge
from .sandbox import (
AsyncSandboxApi,
SandboxApi,
)
from .console import AsyncConsoleClient, ConsoleClient
from .options import Options, get_internal_options
__all__ = ["DenoDeploy", "AsyncDenoDeploy", "Options"]
class DenoDeploy:
def __init__(self, options: Optional[Options] = None):
internal_options = get_internal_options(options)
bridge = AsyncBridge()
client = ConsoleClient(internal_options, bridge)
self.apps = Apps(client)
self.revisions = Revisions(client)
self.timelines = Timelines(client)
self.sandbox = SandboxApi(client, bridge)
self.snapshots = Snapshots(client)
self.volumes = Volumes(client)
class AsyncDenoDeploy:
def __init__(self, options: Optional[Options] = None):
internal_options = get_internal_options(options)
client = AsyncConsoleClient(internal_options)
self.apps = AsyncApps(client)
self.revisions = AsyncRevisions(client)
self.timelines = AsyncTimelines(client)
self.sandbox = AsyncSandboxApi(client)
self.snapshots = AsyncSnapshots(client)
self.volumes = AsyncVolumes(client)