cloud-files 5.3.2__py3-none-any.whl → 5.4.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.
@@ -1,14 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cloud-files
3
- Version: 5.3.2
3
+ Version: 5.4.0
4
4
  Summary: Fast access to cloud storage and local FS.
5
5
  Home-page: https://github.com/seung-lab/cloud-files/
6
6
  Author: William Silversmith
7
7
  Author-email: ws9@princeton.edu
8
- License: License :: OSI Approved :: BSD License
8
+ License: BSD-3-Clause
9
9
  Classifier: Intended Audience :: Developers
10
10
  Classifier: Development Status :: 4 - Beta
11
- Classifier: License :: OSI Approved :: BSD License
12
11
  Classifier: Programming Language :: Python :: 3
13
12
  Classifier: Programming Language :: Python :: 3.9
14
13
  Classifier: Programming Language :: Python :: 3.10
@@ -6,7 +6,7 @@ cloudfiles/exceptions.py,sha256=N0oGQNG-St6RvnT8e5p_yC_E61q2kgAe2scwAL0F49c,843
6
6
  cloudfiles/gcs.py,sha256=unqu5KxGKaPq6N4QeHSpCDdtnK1BzPOAerTZ8FLt2_4,3820
7
7
  cloudfiles/interfaces.py,sha256=f_7doKCiI_8--ghsQJvh8f5HhAn5u3haSlPHlxi_jbw,43949
8
8
  cloudfiles/lib.py,sha256=HHjCvjmOjA0nZWSvHGoSeYpxqd6FAG8xk8LM212LAUA,5382
9
- cloudfiles/paths.py,sha256=ZfdFvbQoFiGgICPM4cjT2TzfP6vf3WEcj31aKON6IwE,12120
9
+ cloudfiles/paths.py,sha256=HOvtdLSIYGwlwvnZt9d_Ez3TXOe7WWd18bZNDpExUDQ,12231
10
10
  cloudfiles/resumable_tools.py,sha256=NyuSoGh1SaP5akrHCpd9kgy2-JruEWrHW9lvJxV7jpE,6711
11
11
  cloudfiles/scheduler.py,sha256=DqDANmOpB3NdzFgJDNMMibRIkCrXQqIh2XGL8GWoc9c,3668
12
12
  cloudfiles/secrets.py,sha256=791b5a8nWSBYtlleGzKeoYIR5jl-FI1bw6INRM4Wy-0,5295
@@ -16,11 +16,11 @@ cloudfiles/typing.py,sha256=f3ZYkNfN9poxhGu5j-P0KCxjCCqSn9HAg5KiIPkjnCg,416
16
16
  cloudfiles_cli/LICENSE,sha256=Jna4xYE8CCQmaxjr5Fs-wmUBnIQJ1DGcNn9MMjbkprk,1538
17
17
  cloudfiles_cli/__init__.py,sha256=Wftt3R3F21QsHtWqx49ODuqT9zcSr0em7wk48kcH0WM,29
18
18
  cloudfiles_cli/cloudfiles_cli.py,sha256=KIK917MxYGmwiI7mXVYpL4M8iiyMew8Pd1eyWoI57yE,34866
19
- cloud_files-5.3.2.dist-info/AUTHORS,sha256=BFVmobgAhaVFI5fqbuqAY5XmBQxe09ZZAsAOTy87hKQ,318
20
- cloud_files-5.3.2.dist-info/LICENSE,sha256=Jna4xYE8CCQmaxjr5Fs-wmUBnIQJ1DGcNn9MMjbkprk,1538
21
- cloud_files-5.3.2.dist-info/METADATA,sha256=jX6_I_uvZjyF0McBTX8mvtmNsAYwPITCZ1ajMDsyBD0,27047
22
- cloud_files-5.3.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
23
- cloud_files-5.3.2.dist-info/entry_points.txt,sha256=xlirb1FVhn1mbcv4IoyMEGumDqKOA4VMVd3drsRQxIg,51
24
- cloud_files-5.3.2.dist-info/pbr.json,sha256=R5UI5unT4kGC4v5sRL2PalbrWn_gy-LzFgRlObVtAtY,46
25
- cloud_files-5.3.2.dist-info/top_level.txt,sha256=xPyrST3okJbsmdCF5IC2gYAVxg_aD5AYVTnNo8UuoZU,26
26
- cloud_files-5.3.2.dist-info/RECORD,,
19
+ cloud_files-5.4.0.dist-info/AUTHORS,sha256=BFVmobgAhaVFI5fqbuqAY5XmBQxe09ZZAsAOTy87hKQ,318
20
+ cloud_files-5.4.0.dist-info/LICENSE,sha256=Jna4xYE8CCQmaxjr5Fs-wmUBnIQJ1DGcNn9MMjbkprk,1538
21
+ cloud_files-5.4.0.dist-info/METADATA,sha256=5kfzAsz8p7atAOuxCL1vVGljLsbyJTKFczui7pT-mH4,26970
22
+ cloud_files-5.4.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
23
+ cloud_files-5.4.0.dist-info/entry_points.txt,sha256=xlirb1FVhn1mbcv4IoyMEGumDqKOA4VMVd3drsRQxIg,51
24
+ cloud_files-5.4.0.dist-info/pbr.json,sha256=dzxLD7W5Cqa2-KE8tL8nKLWjTqsUGyu181SesfMhxXA,46
25
+ cloud_files-5.4.0.dist-info/top_level.txt,sha256=xPyrST3okJbsmdCF5IC2gYAVxg_aD5AYVTnNo8UuoZU,26
26
+ cloud_files-5.4.0.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+ {"git_version": "002c3fc", "is_release": true}
cloudfiles/paths.py CHANGED
@@ -22,6 +22,7 @@ PRECOMPUTED_SUFFIX = '|neuroglancer-precomputed:'
22
22
 
23
23
  ALIAS_FILE = os.path.join(CLOUD_FILES_DIR, "aliases.json")
24
24
  OFFICIAL_ALIASES = {
25
+ "nokura": "s3://https://nokura.pni.princeton.edu/",
25
26
  "matrix": "s3://https://s3-hpcrc.rc.princeton.edu/",
26
27
  "tigerdata": "s3://https://td.princeton.edu/",
27
28
  }
@@ -40,6 +41,10 @@ ALLOWED_FORMATS = [
40
41
  'render', 'vtk', 'nifti', 'dvid',
41
42
  ]
42
43
 
44
+ CLOUD_PROTOCOLS = [
45
+ "gs", "s3"
46
+ ] + list(OFFICIAL_ALIASES.keys())
47
+
43
48
  def update_aliases_from_file():
44
49
  global ALIASES_FROM_FILE
45
50
  global ALIAS_FILE
@@ -374,7 +379,7 @@ def extract(cloudpath:str, windows=None) -> ExtractedPath:
374
379
  cloudpath = toabs(cloudpath)
375
380
 
376
381
  bucket = None
377
- if protocol in ('gs', 's3', 'matrix', 'mem'):
382
+ if protocol in CLOUD_PROTOCOLS + ['mem']:
378
383
  match = re.match(BUCKET_RE, cloudpath)
379
384
  if not match:
380
385
  raise error
@@ -398,7 +403,7 @@ def extract(cloudpath:str, windows=None) -> ExtractedPath:
398
403
 
399
404
  def to_https_protocol(cloudpath):
400
405
  if isinstance(cloudpath, ExtractedPath):
401
- if cloudpath.protocol in ('gs', 's3', 'matrix'):
406
+ if cloudpath.protocol in CLOUD_PROTOCOLS:
402
407
  return extract(to_https_protocol(ascloudpath(cloudpath)))
403
408
  return cloudpath
404
409
 
@@ -1 +0,0 @@
1
- {"git_version": "9370f96", "is_release": true}