Skip to content

Commit bd2aecf

Browse files
committed
doc: move dependancies to private file
1 parent 4a53871 commit bd2aecf

File tree

4 files changed

+61
-32
lines changed

4 files changed

+61
-32
lines changed

scaleway-async/scaleway_async/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,7 @@
5252
"ServiceInfo",
5353
"TimeSeriesPoint",
5454
"TimeSeries",
55+
"InstanceV1API",
5556
]
57+
58+
from scaleway_async.instance.v1 import InstanceV1API

scaleway/scaleway/_bridge.py renamed to scaleway-async/scaleway_async/bridge.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# scaleway_async/_bridge.py
1+
# scaleway_async/bridge.py
22
from scaleway_core.bridge import (
33
Money,
44
Region,
@@ -22,4 +22,3 @@
2222
"TimeSeriesPoint",
2323
"TimeSeries",
2424
]
25-

scaleway/scaleway/__init__.py

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,10 @@
22

33
import importlib.metadata
44

5-
__version__: str = importlib.metadata.version(__name__)
5+
__version__ = importlib.metadata.version(__name__)
66

7-
from scaleway_core.api import (
8-
API,
9-
ScalewayException,
10-
)
7+
# import internal dependencies
8+
from ._dependancies import *
119

12-
from scaleway_core.client import Client
13-
14-
from scaleway_core.profile import (
15-
Profile,
16-
ProfileConfig,
17-
ProfileDefaults,
18-
)
19-
20-
from scaleway_core.utils.waiter import (
21-
WaitForOptions,
22-
WaitForStopCondition,
23-
)
24-
25-
from . import _bridge
26-
27-
__all__ = [
28-
"API",
29-
"ScalewayException",
30-
"Client",
31-
"Profile",
32-
"ProfileConfig",
33-
"ProfileDefaults",
34-
"WaitForOptions",
35-
"WaitForStopCondition",
36-
]
10+
# optional: explicitly define __all__ for public API
11+
# __all__ = _dependancies.__all__

scaleway/scaleway/_dependancies.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# scaleway_async/_dependancies.py
2+
3+
from scaleway_core.api import (
4+
API,
5+
ScalewayException,
6+
)
7+
8+
from scaleway_core.client import Client
9+
10+
from scaleway_core.profile import (
11+
Profile,
12+
ProfileConfig,
13+
ProfileDefaults,
14+
)
15+
16+
from scaleway_core.utils.waiter import (
17+
WaitForOptions,
18+
WaitForStopCondition,
19+
)
20+
21+
from scaleway_core.bridge import (
22+
Money,
23+
Region,
24+
ALL_REGIONS,
25+
Zone,
26+
ALL_ZONES,
27+
ScwFile,
28+
ServiceInfo,
29+
TimeSeriesPoint,
30+
TimeSeries,
31+
)
32+
33+
__all__ = [
34+
"API",
35+
"ScalewayException",
36+
"Client",
37+
"Profile",
38+
"ProfileConfig",
39+
"ProfileDefaults",
40+
"WaitForOptions",
41+
"WaitForStopCondition",
42+
"Money",
43+
"Region",
44+
"ALL_REGIONS",
45+
"Zone",
46+
"ALL_ZONES",
47+
"ScwFile",
48+
"ServiceInfo",
49+
"TimeSeriesPoint",
50+
"TimeSeries",
51+
]
52+

0 commit comments

Comments
 (0)