cloudcat 0.3.6__tar.gz → 0.3.8__tar.gz

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.
Files changed (47) hide show
  1. {cloudcat-0.3.6 → cloudcat-0.3.8}/PKG-INFO +1 -1
  2. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/__init__.py +1 -1
  3. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/cli.py +10 -5
  4. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/compression.py +8 -4
  5. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat.egg-info/PKG-INFO +1 -1
  6. {cloudcat-0.3.6 → cloudcat-0.3.8}/LICENSE +0 -0
  7. {cloudcat-0.3.6 → cloudcat-0.3.8}/README.md +0 -0
  8. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/config.py +0 -0
  9. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/filtering.py +0 -0
  10. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/formatters.py +0 -0
  11. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/progress.py +0 -0
  12. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/__init__.py +0 -0
  13. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/avro.py +0 -0
  14. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/csv.py +0 -0
  15. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/json.py +0 -0
  16. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/orc.py +0 -0
  17. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/parquet.py +0 -0
  18. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/readers/text.py +0 -0
  19. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/storage/__init__.py +0 -0
  20. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/storage/azure.py +0 -0
  21. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/storage/base.py +0 -0
  22. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/storage/gcs.py +0 -0
  23. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/storage/s3.py +0 -0
  24. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/streaming/__init__.py +0 -0
  25. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/streaming/filesystems.py +0 -0
  26. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/streaming/stats.py +0 -0
  27. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat/streaming/tracking.py +0 -0
  28. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat.egg-info/SOURCES.txt +0 -0
  29. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat.egg-info/dependency_links.txt +0 -0
  30. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat.egg-info/entry_points.txt +0 -0
  31. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat.egg-info/requires.txt +0 -0
  32. {cloudcat-0.3.6 → cloudcat-0.3.8}/cloudcat.egg-info/top_level.txt +0 -0
  33. {cloudcat-0.3.6 → cloudcat-0.3.8}/pyproject.toml +0 -0
  34. {cloudcat-0.3.6 → cloudcat-0.3.8}/setup.cfg +0 -0
  35. {cloudcat-0.3.6 → cloudcat-0.3.8}/setup.py +0 -0
  36. {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/__init__.py +0 -0
  37. {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/conftest.py +0 -0
  38. {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_cli.py +0 -0
  39. {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_compression.py +0 -0
  40. {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_config.py +0 -0
  41. {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_data_reading.py +0 -0
  42. {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_file_filtering.py +0 -0
  43. {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_filtering.py +0 -0
  44. {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_format_detection.py +0 -0
  45. {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_integration.py +0 -0
  46. {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_output_formatting.py +0 -0
  47. {cloudcat-0.3.6 → cloudcat-0.3.8}/tests/test_path_parsing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudcat
3
- Version: 0.3.6
3
+ Version: 0.3.8
4
4
  Summary: Preview and analyze data files in Google Cloud Storage, AWS S3, and Azure Data Lake Storage Gen2 from your terminal
5
5
  Home-page: https://github.com/jonathansudhakar1/cloudcat
6
6
  Author: Jonathan Sudhakar
@@ -2,4 +2,4 @@
2
2
  #!/usr/bin/env python
3
3
  """cloudcat - A CLI utility to read and display files from cloud storage."""
4
4
 
5
- __version__ = "0.3.6"
5
+ __version__ = "0.3.8"
@@ -470,7 +470,12 @@ def read_data_streaming(
470
470
  rows_to_read = (offset + num_rows) if num_rows > 0 else 0
471
471
 
472
472
  # For columnar formats without external compression, try native PyArrow filesystem
473
- if input_format in ('parquet', 'orc') and compression is None and supports_pyarrow_fs():
473
+ use_native_fs = input_format in ('parquet', 'orc') and compression is None
474
+ if use_native_fs and not supports_pyarrow_fs():
475
+ click.echo(Fore.YELLOW + "Note: pyarrow.fs not available, downloading full file instead of streaming" + Style.RESET_ALL)
476
+ use_native_fs = False
477
+
478
+ if use_native_fs:
474
479
  try:
475
480
  pyarrow_fs, _ = get_pyarrow_filesystem(
476
481
  service,
@@ -894,13 +899,13 @@ def main(path, output_format, input_format, columns, num_rows, offset, where, sc
894
899
 
895
900
  file_list = get_files_for_multiread(service, bucket, object_path, input_format, max_size_mb, quiet=True)
896
901
 
897
- # For a single file with columnar format, use streaming read for efficiency
898
- if len(file_list) == 1 and input_format in ('parquet', 'orc'):
902
+ # For a single file, use streaming read for efficiency
903
+ if len(file_list) == 1:
899
904
  single_file_path = file_list[0][0]
900
905
  file_name = single_file_path.split('/')[-1]
901
906
  update_progress(f"Reading {file_name}...")
902
907
 
903
- # Use streaming read which supports PyArrow native filesystem
908
+ # Use streaming read for all formats
904
909
  df, full_schema, streaming_stats = read_data_streaming(
905
910
  service, bucket, single_file_path, input_format, num_rows, columns, delimiter, offset
906
911
  )
@@ -909,7 +914,7 @@ def main(path, output_format, input_format, columns, num_rows, offset, where, sc
909
914
  click.echo(Fore.BLUE + f"Inferred input format: {input_format}" + Style.RESET_ALL)
910
915
  multi_file_list = file_list
911
916
  total_record_count = None
912
- else:
917
+ elif len(file_list) > 1:
913
918
  # Read data from multiple files with progress updates
914
919
  update_progress(f"Reading {len(file_list)} files...")
915
920
  df, full_schema, rows_in_files = read_data_from_multiple_files(
@@ -46,8 +46,9 @@ def detect_compression(path: str) -> Optional[str]:
46
46
  path_lower = path.lower()
47
47
 
48
48
  # For Parquet and ORC, snappy is an internal codec - PyArrow handles it
49
- # Files like .parquet.snappy or .orc.snappy don't need external decompression
50
- if path_lower.endswith('.parquet.snappy') or path_lower.endswith('.orc.snappy'):
49
+ # Files like .snappy.parquet (Spark convention) or .parquet.snappy don't need external decompression
50
+ if (path_lower.endswith('.snappy.parquet') or path_lower.endswith('.parquet.snappy') or
51
+ path_lower.endswith('.snappy.orc') or path_lower.endswith('.orc.snappy')):
51
52
  return None
52
53
 
53
54
  if path_lower.endswith('.gz') or path_lower.endswith('.gzip'):
@@ -122,8 +123,11 @@ def strip_compression_extension(path: str) -> str:
122
123
  """
123
124
  path_lower = path.lower()
124
125
 
125
- # For .parquet.snappy and .orc.snappy, strip .snappy to get the format
126
- # (snappy is internal codec, not external compression)
126
+ # For Parquet/ORC with snappy naming conventions, snappy is internal codec
127
+ # .snappy.parquet (Spark) - already ends in .parquet, return as-is
128
+ # .parquet.snappy - strip .snappy to get .parquet
129
+ if path_lower.endswith('.snappy.parquet') or path_lower.endswith('.snappy.orc'):
130
+ return path # Already ends with format extension
127
131
  if path_lower.endswith('.parquet.snappy'):
128
132
  return path[:-len('.snappy')]
129
133
  if path_lower.endswith('.orc.snappy'):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudcat
3
- Version: 0.3.6
3
+ Version: 0.3.8
4
4
  Summary: Preview and analyze data files in Google Cloud Storage, AWS S3, and Azure Data Lake Storage Gen2 from your terminal
5
5
  Home-page: https://github.com/jonathansudhakar1/cloudcat
6
6
  Author: Jonathan Sudhakar
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes