tilebox-grpc 0.36.1__py3-none-any.whl → 0.37.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
_tilebox/grpc/aio/channel.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from collections.abc import Callable
|
|
1
|
+
from collections.abc import Callable, Sequence
|
|
2
2
|
from typing import TypeVar
|
|
3
3
|
|
|
4
4
|
from _tilebox.grpc.channel import CHANNEL_OPTIONS, ChannelInfo, add_metadata, parse_channel_info
|
|
@@ -6,11 +6,12 @@ from grpc import ssl_channel_credentials
|
|
|
6
6
|
from grpc.aio import (
|
|
7
7
|
Channel,
|
|
8
8
|
ClientCallDetails,
|
|
9
|
+
ClientInterceptor,
|
|
9
10
|
UnaryUnaryCall,
|
|
11
|
+
UnaryUnaryClientInterceptor,
|
|
10
12
|
insecure_channel,
|
|
11
13
|
secure_channel,
|
|
12
14
|
)
|
|
13
|
-
from grpc.aio._interceptor import UnaryUnaryClientInterceptor
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
def open_channel(url: str, auth_token: str | None = None) -> Channel:
|
|
@@ -25,14 +26,14 @@ def open_channel(url: str, auth_token: str | None = None) -> Channel:
|
|
|
25
26
|
A gRPC channel.
|
|
26
27
|
"""
|
|
27
28
|
channel_info = parse_channel_info(url)
|
|
28
|
-
interceptors: list[
|
|
29
|
+
interceptors: list[ClientInterceptor] = []
|
|
29
30
|
if auth_token is not None:
|
|
30
31
|
interceptors = [_AuthMetadataInterceptor(auth_token), *interceptors] # add auth interceptor as the first one
|
|
31
32
|
|
|
32
33
|
return _open_channel(channel_info, interceptors)
|
|
33
34
|
|
|
34
35
|
|
|
35
|
-
def _open_channel(channel_info: ChannelInfo, interceptors:
|
|
36
|
+
def _open_channel(channel_info: ChannelInfo, interceptors: Sequence[ClientInterceptor]) -> Channel:
|
|
36
37
|
if channel_info.use_ssl:
|
|
37
38
|
return secure_channel(
|
|
38
39
|
channel_info.url_without_protocol, ssl_channel_credentials(), CHANNEL_OPTIONS, interceptors=interceptors
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tilebox-grpc
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.37.0
|
|
4
4
|
Summary: GRPC / Protocol Buffers functions for Tilebox
|
|
5
5
|
Project-URL: Homepage, https://tilebox.com
|
|
6
6
|
Project-URL: Documentation, https://docs.tilebox.com/
|
|
@@ -39,6 +39,15 @@ Description-Content-Type: text/markdown
|
|
|
39
39
|
<a href="https://pypi.org/project/tilebox-grpc/">
|
|
40
40
|
<img src="https://img.shields.io/pypi/pyversions/tilebox-grpc.svg?style=flat-square&logo=python&color=f43f5e&logoColor=f43f5e" alt="Required Python Version badge"/>
|
|
41
41
|
</a>
|
|
42
|
+
<a href="https://github.com/tilebox/tilebox-python/blob/main/LICENSE">
|
|
43
|
+
<img src="https://img.shields.io/github/license/tilebox/tilebox-python.svg?style=flat-square&color=f43f5e" alt="MIT License"/>
|
|
44
|
+
</a>
|
|
45
|
+
<a href="https://github.com/tilebox/tilebox-python/actions">
|
|
46
|
+
<img src="https://img.shields.io/github/actions/workflow/status/tilebox/tilebox-python/main.yml?style=flat-square&color=f43f5e" alt="Build Status"/>
|
|
47
|
+
</a>
|
|
48
|
+
<a href="https://tilebox.com/discord">
|
|
49
|
+
<img src="https://img.shields.io/badge/Discord-%235865F2.svg?style=flat-square&logo=discord&logoColor=white" alt="Join us on Discord"/>
|
|
50
|
+
</a>
|
|
42
51
|
</div>
|
|
43
52
|
|
|
44
53
|
<p align="center">
|
|
@@ -46,7 +55,7 @@ Description-Content-Type: text/markdown
|
|
|
46
55
|
|
|
|
47
56
|
<a href="https://console.tilebox.com/"><b>Console</b></a>
|
|
48
57
|
|
|
|
49
|
-
<a href="https://tilebox.com/
|
|
58
|
+
<a href="https://examples.tilebox.com/"><b>Example Gallery</b></a>
|
|
50
59
|
</p>
|
|
51
60
|
|
|
52
61
|
# Tilebox GRPC
|
|
@@ -5,11 +5,11 @@ _tilebox/grpc/pagination.py,sha256=-KhkhQ_0IE-BgzjNAmkPac7fH55ZGICstaqRhCLvHGE,1
|
|
|
5
5
|
_tilebox/grpc/producer_consumer.py,sha256=NG6gUCcvYOGbplV1Vq9bFro-4cNpTHvT7eL4zlNDkkA,2154
|
|
6
6
|
_tilebox/grpc/replay.py,sha256=_NC76BfmvazNrJI5MovSnPTC7kYwWZn3Au_0yPlOLsc,6006
|
|
7
7
|
_tilebox/grpc/aio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
_tilebox/grpc/aio/channel.py,sha256=
|
|
8
|
+
_tilebox/grpc/aio/channel.py,sha256=6wWtR4h4ASDYOgAPXP0o_o3h0YEnzonwwwFI6d-5AZY,2305
|
|
9
9
|
_tilebox/grpc/aio/error.py,sha256=Lkf20vuQn9XaLj0MlQ1uqHRaenhYJ_P3rggNZyDMML8,1222
|
|
10
10
|
_tilebox/grpc/aio/pagination.py,sha256=6v95yqgC-m87kD96pjfpIsmY41YuxxR0Se1o3NTrkSs,1115
|
|
11
11
|
_tilebox/grpc/aio/producer_consumer.py,sha256=aOZhZHD74GZEvfeZ9OzUsVk5uUIuuMQp1V7l3Y1PQ0w,2679
|
|
12
12
|
_tilebox/grpc/aio/syncify.py,sha256=jhScVqEwsoNP6gLwJpnIIaBqMC3q4XqSkEfIPokYG8c,4035
|
|
13
|
-
tilebox_grpc-0.
|
|
14
|
-
tilebox_grpc-0.
|
|
15
|
-
tilebox_grpc-0.
|
|
13
|
+
tilebox_grpc-0.37.0.dist-info/METADATA,sha256=_9ZN4eowxbu6qhKmMMcpdJHXEtT3eEYfGK6HxRA7aFY,2955
|
|
14
|
+
tilebox_grpc-0.37.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
15
|
+
tilebox_grpc-0.37.0.dist-info/RECORD,,
|
|
File without changes
|