gnetclisdk 1.0.38__tar.gz → 1.0.39__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gnetclisdk
3
- Version: 1.0.38
3
+ Version: 1.0.39
4
4
  Summary: Client for Gnetcli GRPC-server
5
5
  Home-page: https://github.com/annetutil/gnetcli
6
6
  Author: Alexander Balezin
@@ -243,8 +243,11 @@ class Gnetcli:
243
243
  await grpc_call_wrapper(stub.SetupHostParams, pbcmd)
244
244
  return
245
245
 
246
- async def upload(self, hostname: str, files: Dict[str, File]) -> None:
247
- pbcmd = server_pb2.FileUploadRequest(host=hostname, files=make_files_request(files))
246
+ async def upload(self, hostname: str, files: Dict[str, File], host_params: Optional[HostParams] = None) -> None:
247
+ host_params_pb: Optional[server_pb2.HostParams] = None
248
+ if host_params:
249
+ host_params_pb = host_params.make_pb()
250
+ pbcmd = server_pb2.FileUploadRequest(host=hostname, files=make_files_request(files), host_params=host_params_pb)
248
251
  _logger.debug("connect to %s", self._server)
249
252
  async with self._grpc_channel_fn(self._server, options=self._options) as channel:
250
253
  _logger.debug("upload %s to %s", files.keys(), hostname)
@@ -253,8 +256,11 @@ class Gnetcli:
253
256
  _logger.debug("upload res %s", response)
254
257
  return
255
258
 
256
- async def download(self, hostname: str, paths: List[str]) -> Dict[str, File]:
257
- pbcmd = server_pb2.FileDownloadRequest(host=hostname, paths=paths)
259
+ async def download(self, hostname: str, paths: List[str], host_params: Optional[HostParams] = None) -> Dict[str, File]:
260
+ host_params_pb: Optional[server_pb2.HostParams] = None
261
+ if host_params:
262
+ host_params_pb = host_params.make_pb()
263
+ pbcmd = server_pb2.FileDownloadRequest(host=hostname, paths=paths, host_params=host_params_pb)
258
264
  _logger.debug("connect to %s", self._server)
259
265
  async with self._grpc_channel_fn(self._server, options=self._options) as channel:
260
266
  _logger.debug("download %s from %s", paths, hostname)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gnetclisdk
3
- Version: 1.0.38
3
+ Version: 1.0.39
4
4
  Summary: Client for Gnetcli GRPC-server
5
5
  Home-page: https://github.com/annetutil/gnetcli
6
6
  Author: Alexander Balezin
File without changes
File without changes
File without changes
File without changes
File without changes