pq-peek 0.1.1__tar.gz → 0.1.2__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.
pq_peek-0.1.2/PKG-INFO ADDED
@@ -0,0 +1,68 @@
1
+ Metadata-Version: 2.3
2
+ Name: pq-peek
3
+ Version: 0.1.2
4
+ Summary: A blazing fast CLI tool to inspect Parquet files using Polars.
5
+ Author: Lars Lewerenz
6
+ Author-email: Lars Lewerenz <git.lars.lewerenz@gmail.com>
7
+ Requires-Dist: polars>=1.37.1
8
+ Requires-Dist: rich>=14.3.1
9
+ Requires-Dist: typer>=0.21.1
10
+ Requires-Python: >=3.12
11
+ Description-Content-Type: text/markdown
12
+
13
+ # [pq-peek](https://github.com/lars-lewerenz/pq-peek) 🦆
14
+
15
+ [![PyPI](https://img.shields.io/pypi/v/pq-peek)](https://pypi.org/project/pq-peek/)
16
+ [![Publish](https://github.com/lars-lewerenz/pq-peek/actions/workflows/release.yml/badge.svg)](https://github.com/lars-lewerenz/pq-peek/actions/workflows/release.yml)
17
+ [![Lint](https://github.com/lars-lewerenz/pq-peek/actions/workflows/lint.yml/badge.svg)](https://github.com/lars-lewerenz/pq-peek/actions/workflows/lint.yml)
18
+ [![CLI Smoke](https://github.com/lars-lewerenz/pq-peek/actions/workflows/smoke.yml/badge.svg)](https://github.com/lars-lewerenz/pq-peek/actions/workflows/smoke.yml)
19
+
20
+ A blazing fast, memory-efficient CLI tool to inspect large Parquet files directly in the terminal.
21
+ Built with *Polars*, *Typer*, and *Rich*. Managed via *uv*.
22
+
23
+ ## Install (uv)
24
+
25
+ ```bash
26
+ uv pip install --system pq-peek
27
+ ```
28
+
29
+ ## CLI usage
30
+
31
+ ```bash
32
+ pq-peek schema /path/to/file.parquet
33
+ pq-peek head /path/to/file.parquet --n 5
34
+ pq-peek stats /path/to/file.parquet
35
+ ```
36
+
37
+ ## Sample output
38
+
39
+ ```text
40
+ Preview data.parquet (3 rows)
41
+ ┏━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
42
+ ┃ id ┃ price ┃ category ┃ is_available ┃ description ┃
43
+ ┡━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━┩
44
+ │ 0 │ 16.00485297904456 │ Clothing │ False │ Product description │
45
+ │ │ │ │ │ placeholder │
46
+ │ 1 │ 31.286728959372468 │ Books │ True │ Product description │
47
+ │ │ │ │ │ placeholder │
48
+ │ 2 │ 51.69244000425412 │ Books │ False │ Product description │
49
+ │ │ │ │ │ placeholder │
50
+ └────┴────────────────────┴──────────┴──────────────┴──────────────────────────┘
51
+ ```
52
+
53
+ ## Module usage
54
+
55
+ ```bash
56
+ python -m pq_peek schema /path/to/file.parquet
57
+ ```
58
+
59
+ ## Build and publish (uv)
60
+
61
+ ```bash
62
+ uv build
63
+ uv publish
64
+ ```
65
+
66
+ ## Publishing notes
67
+
68
+ CI publishing uses GitHub's Trusted Publisher OIDC. See `PUBLISHING.md` for the full release steps.
@@ -0,0 +1,56 @@
1
+ # [pq-peek](https://github.com/lars-lewerenz/pq-peek) 🦆
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/pq-peek)](https://pypi.org/project/pq-peek/)
4
+ [![Publish](https://github.com/lars-lewerenz/pq-peek/actions/workflows/release.yml/badge.svg)](https://github.com/lars-lewerenz/pq-peek/actions/workflows/release.yml)
5
+ [![Lint](https://github.com/lars-lewerenz/pq-peek/actions/workflows/lint.yml/badge.svg)](https://github.com/lars-lewerenz/pq-peek/actions/workflows/lint.yml)
6
+ [![CLI Smoke](https://github.com/lars-lewerenz/pq-peek/actions/workflows/smoke.yml/badge.svg)](https://github.com/lars-lewerenz/pq-peek/actions/workflows/smoke.yml)
7
+
8
+ A blazing fast, memory-efficient CLI tool to inspect large Parquet files directly in the terminal.
9
+ Built with *Polars*, *Typer*, and *Rich*. Managed via *uv*.
10
+
11
+ ## Install (uv)
12
+
13
+ ```bash
14
+ uv pip install --system pq-peek
15
+ ```
16
+
17
+ ## CLI usage
18
+
19
+ ```bash
20
+ pq-peek schema /path/to/file.parquet
21
+ pq-peek head /path/to/file.parquet --n 5
22
+ pq-peek stats /path/to/file.parquet
23
+ ```
24
+
25
+ ## Sample output
26
+
27
+ ```text
28
+ Preview data.parquet (3 rows)
29
+ ┏━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
30
+ ┃ id ┃ price ┃ category ┃ is_available ┃ description ┃
31
+ ┡━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━┩
32
+ │ 0 │ 16.00485297904456 │ Clothing │ False │ Product description │
33
+ │ │ │ │ │ placeholder │
34
+ │ 1 │ 31.286728959372468 │ Books │ True │ Product description │
35
+ │ │ │ │ │ placeholder │
36
+ │ 2 │ 51.69244000425412 │ Books │ False │ Product description │
37
+ │ │ │ │ │ placeholder │
38
+ └────┴────────────────────┴──────────┴──────────────┴──────────────────────────┘
39
+ ```
40
+
41
+ ## Module usage
42
+
43
+ ```bash
44
+ python -m pq_peek schema /path/to/file.parquet
45
+ ```
46
+
47
+ ## Build and publish (uv)
48
+
49
+ ```bash
50
+ uv build
51
+ uv publish
52
+ ```
53
+
54
+ ## Publishing notes
55
+
56
+ CI publishing uses GitHub's Trusted Publisher OIDC. See `PUBLISHING.md` for the full release steps.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pq-peek"
3
- version = "0.1.1"
3
+ version = "0.1.2"
4
4
  description = "A blazing fast CLI tool to inspect Parquet files using Polars."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -9,13 +9,15 @@ from rich.table import Table
9
9
  app = typer.Typer(help="A fast CLI tool to inspect Parquet files")
10
10
  console = Console()
11
11
 
12
+
12
13
  def get_scan(file_path: Path) -> pl.LazyFrame:
13
14
  verify_path(file_path)
14
15
  return pl.scan_parquet(file_path)
15
16
 
17
+
16
18
  def verify_path(file_path: Path):
17
19
  """
18
- Verifies that the file exists and checks the correct ending
20
+ Verifies that the file exists and checks the correct ending
19
21
  """
20
22
  if not file_path.exists():
21
23
  rprint(f"[bold red]Error:[/bold red] File was not found: '{file_path}'")
@@ -23,6 +25,7 @@ def verify_path(file_path: Path):
23
25
  if file_path.suffix != ".parquet":
24
26
  rprint("[bold yellow]Warning:[/bold yellow] File does not end with '.parquet'")
25
27
 
28
+
26
29
  @app.command()
27
30
  def schema(file_path: Path):
28
31
  """
@@ -43,9 +46,12 @@ def schema(file_path: Path):
43
46
  console.print(table)
44
47
  rprint(f"\n[green]Amount of columns:[/green] {len(schema)}")
45
48
  except Exception as failure:
46
- rprint(f"[bold red]Failure while reading the parquet file:[/bold red] {failure}")
49
+ rprint(
50
+ f"[bold red]Failure while reading the parquet file:[/bold red] {failure}"
51
+ )
47
52
  raise typer.Exit(code=1)
48
53
 
54
+
49
55
  @app.command()
50
56
  def head(file_path: Path, n: int = typer.Option(5, help="Amount of rows")):
51
57
  """
@@ -58,7 +64,7 @@ def head(file_path: Path, n: int = typer.Option(5, help="Amount of rows")):
58
64
  if df.is_empty():
59
65
  rprint("[yellow]File is empty.[/yellow]")
60
66
  return
61
-
67
+
62
68
  table = Table(title=f"Preview {file_path.name} ({n} rows)")
63
69
 
64
70
  for column in df.columns:
@@ -67,14 +73,15 @@ def head(file_path: Path, n: int = typer.Option(5, help="Amount of rows")):
67
73
  for row in df.iter_rows():
68
74
  str_row = [str(x) for x in row]
69
75
  table.add_row(*str_row)
70
-
76
+
71
77
  console.print(table)
72
78
  except Exception as failure:
73
- rprint(f"[bold red]Failure while reading the parquet file:[/bold red] {failure}")
79
+ rprint(
80
+ f"[bold red]Failure while reading the parquet file:[/bold red] {failure}"
81
+ )
74
82
  raise typer.Exit(code=1)
75
83
 
76
84
 
77
-
78
85
  @app.command()
79
86
  def stats(file_path: Path):
80
87
  """
@@ -95,4 +102,4 @@ def stats(file_path: Path):
95
102
 
96
103
 
97
104
  if __name__ == "__main__":
98
- app()
105
+ app()
pq_peek-0.1.1/PKG-INFO DELETED
@@ -1,47 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: pq-peek
3
- Version: 0.1.1
4
- Summary: A blazing fast CLI tool to inspect Parquet files using Polars.
5
- Author: Lars Lewerenz
6
- Author-email: Lars Lewerenz <git.lars.lewerenz@gmail.com>
7
- Requires-Dist: polars>=1.37.1
8
- Requires-Dist: rich>=14.3.1
9
- Requires-Dist: typer>=0.21.1
10
- Requires-Python: >=3.12
11
- Description-Content-Type: text/markdown
12
-
13
- pq-peek 🦆
14
-
15
- A blazing fast, memory-efficient CLI tool to inspect large Parquet files directly in the terminal.
16
- Built with *Polars*, *Typer*, and *Rich*. Managed via *uv*.
17
-
18
- ## Install (uv)
19
-
20
- ```bash
21
- uv pip install pq-peek
22
- ```
23
-
24
- ## CLI usage
25
-
26
- ```bash
27
- pq-peek schema /path/to/file.parquet
28
- pq-peek head /path/to/file.parquet --n 5
29
- pq-peek stats /path/to/file.parquet
30
- ```
31
-
32
- ## Module usage
33
-
34
- ```bash
35
- python -m pq_peek schema /path/to/file.parquet
36
- ```
37
-
38
- ## Build and publish (uv)
39
-
40
- ```bash
41
- uv build
42
- uv publish
43
- ```
44
-
45
- ## Publishing notes
46
-
47
- CI publishing uses GitHub's Trusted Publisher OIDC. See `PUBLISHING.md` for the full release steps.
pq_peek-0.1.1/README.md DELETED
@@ -1,35 +0,0 @@
1
- pq-peek 🦆
2
-
3
- A blazing fast, memory-efficient CLI tool to inspect large Parquet files directly in the terminal.
4
- Built with *Polars*, *Typer*, and *Rich*. Managed via *uv*.
5
-
6
- ## Install (uv)
7
-
8
- ```bash
9
- uv pip install pq-peek
10
- ```
11
-
12
- ## CLI usage
13
-
14
- ```bash
15
- pq-peek schema /path/to/file.parquet
16
- pq-peek head /path/to/file.parquet --n 5
17
- pq-peek stats /path/to/file.parquet
18
- ```
19
-
20
- ## Module usage
21
-
22
- ```bash
23
- python -m pq_peek schema /path/to/file.parquet
24
- ```
25
-
26
- ## Build and publish (uv)
27
-
28
- ```bash
29
- uv build
30
- uv publish
31
- ```
32
-
33
- ## Publishing notes
34
-
35
- CI publishing uses GitHub's Trusted Publisher OIDC. See `PUBLISHING.md` for the full release steps.
File without changes
File without changes
File without changes