iparq 0.1.7__tar.gz → 0.2.5__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.
- {iparq-0.1.7 → iparq-0.2.5}/.github/workflows/merge.yml +1 -1
- iparq-0.2.5/.github/workflows/python-package.yml +50 -0
- {iparq-0.1.7 → iparq-0.2.5}/.vscode/launch.json +1 -3
- iparq-0.2.5/PKG-INFO +145 -0
- iparq-0.2.5/README.md +127 -0
- {iparq-0.1.7 → iparq-0.2.5}/pyproject.toml +7 -6
- iparq-0.2.5/src/iparq/py.typed +0 -0
- iparq-0.2.5/src/iparq/source.py +326 -0
- iparq-0.2.5/tests/conftest.py +0 -0
- iparq-0.2.5/tests/dummy.parquet +0 -0
- iparq-0.2.5/tests/test_cli.py +78 -0
- {iparq-0.1.7 → iparq-0.2.5}/uv.lock +109 -105
- iparq-0.1.7/.github/workflows/python-package.yml +0 -41
- iparq-0.1.7/PKG-INFO +0 -216
- iparq-0.1.7/README.md +0 -199
- iparq-0.1.7/src/iparq/source.py +0 -182
- iparq-0.1.7/tests/test_cli.py +0 -2
- {iparq-0.1.7 → iparq-0.2.5}/.github/copilot-instructions.md +0 -0
- {iparq-0.1.7 → iparq-0.2.5}/.github/dependabot.yml +0 -0
- {iparq-0.1.7 → iparq-0.2.5}/.github/workflows/python-publish.yml +0 -0
- {iparq-0.1.7 → iparq-0.2.5}/.gitignore +0 -0
- {iparq-0.1.7 → iparq-0.2.5}/.python-version +0 -0
- {iparq-0.1.7 → iparq-0.2.5}/.vscode/settings.json +0 -0
- {iparq-0.1.7 → iparq-0.2.5}/CONTRIBUTING.md +0 -0
- {iparq-0.1.7 → iparq-0.2.5}/LICENSE +0 -0
- {iparq-0.1.7 → iparq-0.2.5}/dummy.parquet +0 -0
- {iparq-0.1.7 → iparq-0.2.5}/media/iparq.png +0 -0
- {iparq-0.1.7 → iparq-0.2.5}/src/iparq/__init__.py +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
3
|
+
|
|
4
|
+
name: Python package
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [ "main" ]
|
|
8
|
+
pull_request:
|
|
9
|
+
branches: [ "main" ]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
pull-requests: write
|
|
16
|
+
name: Test ${{ matrix.os }} Python ${{ matrix.python_version }}
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
os: ["ubuntu-20.04", "windows-latest"]
|
|
22
|
+
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
23
|
+
env:
|
|
24
|
+
UV_SYSTEM_PYTHON: 1
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
- name: Setup python
|
|
28
|
+
uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python_version }}
|
|
31
|
+
architecture: x64
|
|
32
|
+
- name: Install uv
|
|
33
|
+
uses: astral-sh/setup-uv@v5
|
|
34
|
+
|
|
35
|
+
# dependencies are in uv.lock
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: |
|
|
38
|
+
uv sync --all-extras
|
|
39
|
+
|
|
40
|
+
- name: Lint with ruff
|
|
41
|
+
run: uv run ruff check .
|
|
42
|
+
- name: Check types with mypy
|
|
43
|
+
run: |
|
|
44
|
+
cd src/iparq
|
|
45
|
+
uv run mypy . --config-file=../../pyproject.toml
|
|
46
|
+
- name: Check formatting with black
|
|
47
|
+
run: uvx black . --check --verbose
|
|
48
|
+
- name: Run Python tests
|
|
49
|
+
if: runner.os != 'Windows'
|
|
50
|
+
run: uv run pytest -vv
|
iparq-0.2.5/PKG-INFO
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: iparq
|
|
3
|
+
Version: 0.2.5
|
|
4
|
+
Summary: Display version compression and bloom filter information about a parquet file
|
|
5
|
+
Author-email: MiguelElGallo <miguel.zurcher@gmail.com>
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.9
|
|
8
|
+
Requires-Dist: pyarrow
|
|
9
|
+
Requires-Dist: pydantic
|
|
10
|
+
Requires-Dist: rich
|
|
11
|
+
Requires-Dist: typer[all]
|
|
12
|
+
Provides-Extra: checks
|
|
13
|
+
Requires-Dist: mypy>=1.14.1; extra == 'checks'
|
|
14
|
+
Requires-Dist: ruff>=0.9.3; extra == 'checks'
|
|
15
|
+
Provides-Extra: test
|
|
16
|
+
Requires-Dist: pytest>=7.0; extra == 'test'
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# iparq
|
|
20
|
+
|
|
21
|
+
[](https://github.com/MiguelElGallo/iparq/actions/workflows/python-package.yml)
|
|
22
|
+
|
|
23
|
+
[](https://github.com/MiguelElGallo/iparq/actions/workflows/dependabot/dependabot-updates)
|
|
24
|
+
|
|
25
|
+
[](https://github.com/MiguelElGallo/iparq/actions/workflows/python-publish.yml)
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
After reading [this blog](https://duckdb.org/2025/01/22/parquet-encodings.html), I began to wonder which Parquet version and compression methods the everyday tools we rely on actually use, only to find that there's no straightforward way to determine this. That curiosity and the difficulty of quickly discovering such details motivated me to create iparq (Information Parquet). My goal with iparq is to help users easily identify the specifics of the Parquet files generated by different engines, making it clear which features—like newer encodings or certain compression algorithms—the creator of the parquet is using.
|
|
29
|
+
|
|
30
|
+
***New*** Bloom filters information: Displays if there are bloom filters.
|
|
31
|
+
Read more about bloom filters in this [great article](https://duckdb.org/2025/03/07/parquet-bloom-filters-in-duckdb.html).
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
### Zero installation - Recommended
|
|
36
|
+
|
|
37
|
+
1) Make sure to have Astral's UV installed by following the steps here:
|
|
38
|
+
|
|
39
|
+
<https://docs.astral.sh/uv/getting-started/installation/>
|
|
40
|
+
|
|
41
|
+
2) Execute the following command:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
uvx --refresh iparq inspect yourparquet.parquet
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Using pip
|
|
48
|
+
|
|
49
|
+
1) Install the package using pip:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
pip install iparq
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
2) Verify the installation by running:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
iparq --help
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Using uv
|
|
62
|
+
|
|
63
|
+
1) Make sure to have Astral's UV installed by following the steps here:
|
|
64
|
+
|
|
65
|
+
<https://docs.astral.sh/uv/getting-started/installation/>
|
|
66
|
+
|
|
67
|
+
2) Execute the following command:
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
uv pip install iparq
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
3) Verify the installation by running:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
iparq --help
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Using Homebrew in a MAC
|
|
80
|
+
|
|
81
|
+
1) Run the following:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
brew tap MiguelElGallo/tap https://github.com/MiguelElGallo//homebrew-iparq.git
|
|
85
|
+
brew install MiguelElGallo/tap/iparq
|
|
86
|
+
iparq --help
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Usage
|
|
90
|
+
|
|
91
|
+
iparq now supports additional options:
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
iparq inspect <filename> [OPTIONS]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Options include:
|
|
98
|
+
|
|
99
|
+
- `--format`, `-f`: Output format, either `rich` (default) or `json`
|
|
100
|
+
- `--metadata-only`, `-m`: Show only file metadata without column details
|
|
101
|
+
- `--column`, `-c`: Filter results to show only a specific column
|
|
102
|
+
|
|
103
|
+
Examples:
|
|
104
|
+
|
|
105
|
+
```sh
|
|
106
|
+
# Output in JSON format
|
|
107
|
+
iparq inspect yourfile.parquet --format json
|
|
108
|
+
|
|
109
|
+
# Show only metadata
|
|
110
|
+
iparq inspect yourfile.parquet --metadata-only
|
|
111
|
+
|
|
112
|
+
# Filter to show only a specific column
|
|
113
|
+
iparq inspect yourfile.parquet --column column_name
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Replace `<filename>` with the path to your .parquet file. The utility will read the metadata of the file and print the compression codecs used in the parquet file.
|
|
117
|
+
|
|
118
|
+
## Example ouput - Bloom Filters
|
|
119
|
+
|
|
120
|
+
```log
|
|
121
|
+
ParquetMetaModel(
|
|
122
|
+
created_by='DuckDB version v1.2.1 (build 8e52ec4395)',
|
|
123
|
+
num_columns=1,
|
|
124
|
+
num_rows=100000000,
|
|
125
|
+
num_row_groups=10,
|
|
126
|
+
format_version='1.0',
|
|
127
|
+
serialized_size=1196
|
|
128
|
+
)
|
|
129
|
+
Parquet Column Information
|
|
130
|
+
┏━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
|
|
131
|
+
┃ Row Group ┃ Column Name ┃ Index ┃ Compression ┃ Bloom Filter ┃
|
|
132
|
+
┡━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
|
|
133
|
+
│ 0 │ r │ 0 │ SNAPPY │ ✅ │
|
|
134
|
+
│ 1 │ r │ 0 │ SNAPPY │ ✅ │
|
|
135
|
+
│ 2 │ r │ 0 │ SNAPPY │ ✅ │
|
|
136
|
+
│ 3 │ r │ 0 │ SNAPPY │ ✅ │
|
|
137
|
+
│ 4 │ r │ 0 │ SNAPPY │ ✅ │
|
|
138
|
+
│ 5 │ r │ 0 │ SNAPPY │ ✅ │
|
|
139
|
+
│ 6 │ r │ 0 │ SNAPPY │ ✅ │
|
|
140
|
+
│ 7 │ r │ 0 │ SNAPPY │ ✅ │
|
|
141
|
+
│ 8 │ r │ 0 │ SNAPPY │ ✅ │
|
|
142
|
+
│ 9 │ r │ 0 │ SNAPPY │ ✅ │
|
|
143
|
+
└───────────┴─────────────┴───────┴─────────────┴──────────────┘
|
|
144
|
+
Compression codecs: {'SNAPPY'}
|
|
145
|
+
```
|
iparq-0.2.5/README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# iparq
|
|
2
|
+
|
|
3
|
+
[](https://github.com/MiguelElGallo/iparq/actions/workflows/python-package.yml)
|
|
4
|
+
|
|
5
|
+
[](https://github.com/MiguelElGallo/iparq/actions/workflows/dependabot/dependabot-updates)
|
|
6
|
+
|
|
7
|
+
[](https://github.com/MiguelElGallo/iparq/actions/workflows/python-publish.yml)
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
After reading [this blog](https://duckdb.org/2025/01/22/parquet-encodings.html), I began to wonder which Parquet version and compression methods the everyday tools we rely on actually use, only to find that there's no straightforward way to determine this. That curiosity and the difficulty of quickly discovering such details motivated me to create iparq (Information Parquet). My goal with iparq is to help users easily identify the specifics of the Parquet files generated by different engines, making it clear which features—like newer encodings or certain compression algorithms—the creator of the parquet is using.
|
|
11
|
+
|
|
12
|
+
***New*** Bloom filters information: Displays if there are bloom filters.
|
|
13
|
+
Read more about bloom filters in this [great article](https://duckdb.org/2025/03/07/parquet-bloom-filters-in-duckdb.html).
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
### Zero installation - Recommended
|
|
18
|
+
|
|
19
|
+
1) Make sure to have Astral's UV installed by following the steps here:
|
|
20
|
+
|
|
21
|
+
<https://docs.astral.sh/uv/getting-started/installation/>
|
|
22
|
+
|
|
23
|
+
2) Execute the following command:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
uvx --refresh iparq inspect yourparquet.parquet
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Using pip
|
|
30
|
+
|
|
31
|
+
1) Install the package using pip:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
pip install iparq
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
2) Verify the installation by running:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
iparq --help
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Using uv
|
|
44
|
+
|
|
45
|
+
1) Make sure to have Astral's UV installed by following the steps here:
|
|
46
|
+
|
|
47
|
+
<https://docs.astral.sh/uv/getting-started/installation/>
|
|
48
|
+
|
|
49
|
+
2) Execute the following command:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
uv pip install iparq
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
3) Verify the installation by running:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
iparq --help
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Using Homebrew in a MAC
|
|
62
|
+
|
|
63
|
+
1) Run the following:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
brew tap MiguelElGallo/tap https://github.com/MiguelElGallo//homebrew-iparq.git
|
|
67
|
+
brew install MiguelElGallo/tap/iparq
|
|
68
|
+
iparq --help
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Usage
|
|
72
|
+
|
|
73
|
+
iparq now supports additional options:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
iparq inspect <filename> [OPTIONS]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Options include:
|
|
80
|
+
|
|
81
|
+
- `--format`, `-f`: Output format, either `rich` (default) or `json`
|
|
82
|
+
- `--metadata-only`, `-m`: Show only file metadata without column details
|
|
83
|
+
- `--column`, `-c`: Filter results to show only a specific column
|
|
84
|
+
|
|
85
|
+
Examples:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
# Output in JSON format
|
|
89
|
+
iparq inspect yourfile.parquet --format json
|
|
90
|
+
|
|
91
|
+
# Show only metadata
|
|
92
|
+
iparq inspect yourfile.parquet --metadata-only
|
|
93
|
+
|
|
94
|
+
# Filter to show only a specific column
|
|
95
|
+
iparq inspect yourfile.parquet --column column_name
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Replace `<filename>` with the path to your .parquet file. The utility will read the metadata of the file and print the compression codecs used in the parquet file.
|
|
99
|
+
|
|
100
|
+
## Example ouput - Bloom Filters
|
|
101
|
+
|
|
102
|
+
```log
|
|
103
|
+
ParquetMetaModel(
|
|
104
|
+
created_by='DuckDB version v1.2.1 (build 8e52ec4395)',
|
|
105
|
+
num_columns=1,
|
|
106
|
+
num_rows=100000000,
|
|
107
|
+
num_row_groups=10,
|
|
108
|
+
format_version='1.0',
|
|
109
|
+
serialized_size=1196
|
|
110
|
+
)
|
|
111
|
+
Parquet Column Information
|
|
112
|
+
┏━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
|
|
113
|
+
┃ Row Group ┃ Column Name ┃ Index ┃ Compression ┃ Bloom Filter ┃
|
|
114
|
+
┡━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
|
|
115
|
+
│ 0 │ r │ 0 │ SNAPPY │ ✅ │
|
|
116
|
+
│ 1 │ r │ 0 │ SNAPPY │ ✅ │
|
|
117
|
+
│ 2 │ r │ 0 │ SNAPPY │ ✅ │
|
|
118
|
+
│ 3 │ r │ 0 │ SNAPPY │ ✅ │
|
|
119
|
+
│ 4 │ r │ 0 │ SNAPPY │ ✅ │
|
|
120
|
+
│ 5 │ r │ 0 │ SNAPPY │ ✅ │
|
|
121
|
+
│ 6 │ r │ 0 │ SNAPPY │ ✅ │
|
|
122
|
+
│ 7 │ r │ 0 │ SNAPPY │ ✅ │
|
|
123
|
+
│ 8 │ r │ 0 │ SNAPPY │ ✅ │
|
|
124
|
+
│ 9 │ r │ 0 │ SNAPPY │ ✅ │
|
|
125
|
+
└───────────┴─────────────┴───────┴─────────────┴──────────────┘
|
|
126
|
+
Compression codecs: {'SNAPPY'}
|
|
127
|
+
```
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "iparq"
|
|
3
|
-
version = "0.
|
|
4
|
-
description = "Display version and
|
|
3
|
+
version = "0.2.5"
|
|
4
|
+
description = "Display version compression and bloom filter information about a parquet file"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
7
7
|
{ name = "MiguelElGallo", email = "miguel.zurcher@gmail.com" }
|
|
8
8
|
]
|
|
9
9
|
requires-python = ">=3.9"
|
|
10
10
|
dependencies = [
|
|
11
|
-
"pyarrow
|
|
12
|
-
"
|
|
13
|
-
"
|
|
11
|
+
"pyarrow",
|
|
12
|
+
"typer[all]",
|
|
13
|
+
"pydantic",
|
|
14
|
+
"rich",
|
|
14
15
|
]
|
|
15
16
|
|
|
16
17
|
[project.optional-dependencies]
|
|
@@ -30,7 +31,7 @@ requires = ["hatchling"]
|
|
|
30
31
|
build-backend = "hatchling.build"
|
|
31
32
|
|
|
32
33
|
[tool.pytest.ini_options]
|
|
33
|
-
addopts = "-ra -q"
|
|
34
|
+
addopts = ["-ra", "-q"]
|
|
34
35
|
testpaths = [
|
|
35
36
|
"tests",
|
|
36
37
|
]
|
|
File without changes
|