cloud-files 6.0.0__py3-none-any.whl → 6.1.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.
- {cloud_files-6.0.0.dist-info → cloud_files-6.1.0.dist-info}/METADATA +1 -1
- {cloud_files-6.0.0.dist-info → cloud_files-6.1.0.dist-info}/RECORD +10 -10
- cloud_files-6.1.0.dist-info/pbr.json +1 -0
- cloudfiles/cloudfiles.py +8 -4
- cloudfiles/interfaces.py +7 -6
- cloud_files-6.0.0.dist-info/pbr.json +0 -1
- {cloud_files-6.0.0.dist-info → cloud_files-6.1.0.dist-info}/AUTHORS +0 -0
- {cloud_files-6.0.0.dist-info → cloud_files-6.1.0.dist-info}/LICENSE +0 -0
- {cloud_files-6.0.0.dist-info → cloud_files-6.1.0.dist-info}/WHEEL +0 -0
- {cloud_files-6.0.0.dist-info → cloud_files-6.1.0.dist-info}/entry_points.txt +0 -0
- {cloud_files-6.0.0.dist-info → cloud_files-6.1.0.dist-info}/top_level.txt +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
cloudfiles/__init__.py,sha256=pLB4CcV2l3Jgv_ni1520Np1pfzFj8Cpr87vNxFT3rNI,493
|
|
2
|
-
cloudfiles/cloudfiles.py,sha256=
|
|
2
|
+
cloudfiles/cloudfiles.py,sha256=SFzhNE53bnZUCVSAkvC8UAxIlsXYo97_5wuQy2ijbUI,58109
|
|
3
3
|
cloudfiles/compression.py,sha256=WXJHnoNLJ_NWyoY9ygZmFA2qMou35_9xS5dzF7-2H-M,6262
|
|
4
4
|
cloudfiles/connectionpools.py,sha256=aL8RiSjRepECfgAFmJcz80aJFKbou7hsbuEgugDKwB8,4814
|
|
5
5
|
cloudfiles/exceptions.py,sha256=N0oGQNG-St6RvnT8e5p_yC_E61q2kgAe2scwAL0F49c,843
|
|
6
6
|
cloudfiles/gcs.py,sha256=unqu5KxGKaPq6N4QeHSpCDdtnK1BzPOAerTZ8FLt2_4,3820
|
|
7
|
-
cloudfiles/interfaces.py,sha256=
|
|
7
|
+
cloudfiles/interfaces.py,sha256=cLLrHd4P_NkHBxob3mHP20dVgjzukgVccPuhOmvKjxg,47556
|
|
8
8
|
cloudfiles/lib.py,sha256=HHjCvjmOjA0nZWSvHGoSeYpxqd6FAG8xk8LM212LAUA,5382
|
|
9
9
|
cloudfiles/monitoring.py,sha256=N5Xq0PYZK1OxoYtwBFsnnfaq7dElTgY8Rn2Ez_I3aoo,20897
|
|
10
10
|
cloudfiles/paths.py,sha256=FLdShqkOg1XlkHurU9eiKzLadx2JFYG1EmleCpOFsYQ,12229
|
|
@@ -17,11 +17,11 @@ cloudfiles/typing.py,sha256=f3ZYkNfN9poxhGu5j-P0KCxjCCqSn9HAg5KiIPkjnCg,416
|
|
|
17
17
|
cloudfiles_cli/LICENSE,sha256=Jna4xYE8CCQmaxjr5Fs-wmUBnIQJ1DGcNn9MMjbkprk,1538
|
|
18
18
|
cloudfiles_cli/__init__.py,sha256=Wftt3R3F21QsHtWqx49ODuqT9zcSr0em7wk48kcH0WM,29
|
|
19
19
|
cloudfiles_cli/cloudfiles_cli.py,sha256=jHbQasZb5DB_g8nGxS3Y0ekAdIPcSVrHN5mvEedUl0k,38908
|
|
20
|
-
cloud_files-6.
|
|
21
|
-
cloud_files-6.
|
|
22
|
-
cloud_files-6.
|
|
23
|
-
cloud_files-6.
|
|
24
|
-
cloud_files-6.
|
|
25
|
-
cloud_files-6.
|
|
26
|
-
cloud_files-6.
|
|
27
|
-
cloud_files-6.
|
|
20
|
+
cloud_files-6.1.0.dist-info/AUTHORS,sha256=BFVmobgAhaVFI5fqbuqAY5XmBQxe09ZZAsAOTy87hKQ,318
|
|
21
|
+
cloud_files-6.1.0.dist-info/LICENSE,sha256=Jna4xYE8CCQmaxjr5Fs-wmUBnIQJ1DGcNn9MMjbkprk,1538
|
|
22
|
+
cloud_files-6.1.0.dist-info/METADATA,sha256=G9NyiEt5s7W6ZDCITAbMsuRY9_nu-v0MDik6UZ6VoLM,30530
|
|
23
|
+
cloud_files-6.1.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
24
|
+
cloud_files-6.1.0.dist-info/entry_points.txt,sha256=xlirb1FVhn1mbcv4IoyMEGumDqKOA4VMVd3drsRQxIg,51
|
|
25
|
+
cloud_files-6.1.0.dist-info/pbr.json,sha256=mjRXPURkTa6mUTvmiVVywP6aVncvm0pgPUdtDGg4H8Q,46
|
|
26
|
+
cloud_files-6.1.0.dist-info/top_level.txt,sha256=xPyrST3okJbsmdCF5IC2gYAVxg_aD5AYVTnNo8UuoZU,26
|
|
27
|
+
cloud_files-6.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "411220d", "is_release": true}
|
cloudfiles/cloudfiles.py
CHANGED
|
@@ -759,10 +759,14 @@ class CloudFiles:
|
|
|
759
759
|
|
|
760
760
|
def put(
|
|
761
761
|
self,
|
|
762
|
-
path:str,
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
762
|
+
path:str,
|
|
763
|
+
content:Union[BinaryIO,bytes],
|
|
764
|
+
content_type:str = None,
|
|
765
|
+
compress:CompressType = None,
|
|
766
|
+
compression_level:Optional[int] = None,
|
|
767
|
+
cache_control:Optional[str] = None,
|
|
768
|
+
raw:bool = False,
|
|
769
|
+
storage_class:Optional[str] = None
|
|
766
770
|
) -> int:
|
|
767
771
|
"""
|
|
768
772
|
Write a single file.
|
cloudfiles/interfaces.py
CHANGED
|
@@ -446,11 +446,12 @@ class MemoryInterface(StorageInterface):
|
|
|
446
446
|
elif compress:
|
|
447
447
|
raise ValueError("Compression type {} not supported.".format(compress))
|
|
448
448
|
|
|
449
|
-
if
|
|
450
|
-
|
|
451
|
-
and
|
|
452
|
-
and
|
|
453
|
-
|
|
449
|
+
if (
|
|
450
|
+
isinstance(content, str)
|
|
451
|
+
and len(content) > 0
|
|
452
|
+
and content_type
|
|
453
|
+
and re.search('json|te?xt', content_type)
|
|
454
|
+
):
|
|
454
455
|
content = content.encode('utf-8')
|
|
455
456
|
|
|
456
457
|
if hasattr(content, "read") and hasattr(content, "seek"):
|
|
@@ -480,7 +481,7 @@ class MemoryInterface(StorageInterface):
|
|
|
480
481
|
encoding = None
|
|
481
482
|
|
|
482
483
|
result = self._data.get(path, None)
|
|
483
|
-
if result:
|
|
484
|
+
if isinstance(result, (bytes, bytearray, str)):
|
|
484
485
|
result = result[slice(start, end)]
|
|
485
486
|
return (result, encoding, None, None)
|
|
486
487
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"git_version": "38a2b59", "is_release": true}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|