preflight-kit 0.2.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.
- preflight_kit/__init__.py +0 -0
- preflight_kit/cli.py +72 -0
- preflight_kit/engine.py +62 -0
- preflight_kit/fixer.py +50 -0
- preflight_kit/header_registry.py +126 -0
- preflight_kit/json_dump.py +85 -0
- preflight_kit/loader.py +291 -0
- preflight_kit/models.py +66 -0
- preflight_kit/reporters.py +145 -0
- preflight_kit/rules/__init__.py +4 -0
- preflight_kit/rules/file_rules.py +210 -0
- preflight_kit/rules/row_rules.py +448 -0
- preflight_kit-0.2.0.dist-info/METADATA +124 -0
- preflight_kit-0.2.0.dist-info/RECORD +17 -0
- preflight_kit-0.2.0.dist-info/WHEEL +4 -0
- preflight_kit-0.2.0.dist-info/entry_points.txt +2 -0
- preflight_kit-0.2.0.dist-info/licenses/LICENSE +33 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: preflight-kit
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Preflight Kit — preflight validator for Shopify product CSV, catches import-breaking mistakes before you upload (formerly csv-preflight)
|
|
5
|
+
Project-URL: Homepage, https://preflight-kit.pages.dev/
|
|
6
|
+
Project-URL: Repository, https://github.com/q00tar00/preflight-kit
|
|
7
|
+
Project-URL: Issues, https://github.com/q00tar00/preflight-kit/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/q00tar00/preflight-kit/blob/main/CHANGELOG.md
|
|
9
|
+
Author: q00tar00
|
|
10
|
+
License: LicenseRef-Source-Available
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: csv,ecommerce,preflight,product-import,shopify,validator
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Utilities
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# Preflight Kit — product CSV preflight validator for Shopify
|
|
27
|
+
|
|
28
|
+
[](https://pypi.org/project/preflight-kit/)
|
|
29
|
+
[](LICENSE)
|
|
30
|
+
[](https://github.com/q00tar00/preflight-kit/actions/workflows/ci.yml)
|
|
31
|
+
|
|
32
|
+
Validate a Shopify **product** CSV before uploading it. `preflight-kit` runs locally, never connects to a Shopify store, and needs no API key. It reports import-risk findings and produces reviewable output files without changing the input CSV.
|
|
33
|
+
|
|
34
|
+
> **Status:** Beta CLI, version 0.2.0 (formerly published as `csv-preflight`). This is a local, file-processing tool for product CSVs only. It has no Admin API integration, store-write capability, or user account system.
|
|
35
|
+
|
|
36
|
+
## Project links
|
|
37
|
+
|
|
38
|
+
- Web checker: [preflight-kit.pages.dev](https://preflight-kit.pages.dev/) (no upload or login)
|
|
39
|
+
- Package: [PyPI — preflight-kit](https://pypi.org/project/preflight-kit/)
|
|
40
|
+
- Source and issue tracker: [q00tar00/preflight-kit](https://github.com/q00tar00/preflight-kit)
|
|
41
|
+
- Change history: [CHANGELOG.md](CHANGELOG.md)
|
|
42
|
+
|
|
43
|
+
## What it checks
|
|
44
|
+
|
|
45
|
+
The validator checks Shopify product-CSV structure and row-level risks, including:
|
|
46
|
+
|
|
47
|
+
- UTF-8 encoding, BOMs, control characters, headers, file size, and column alignment.
|
|
48
|
+
- Missing or duplicate product handles, required-column gaps, and variant parent linkage.
|
|
49
|
+
- Duplicate option combinations and option dependency or position problems.
|
|
50
|
+
- SKU gaps, reused SKUs, and Excel-style scientific notation.
|
|
51
|
+
- Inventory, fulfillment, price, image URL, and image-alt-text consistency.
|
|
52
|
+
- Product CSVs that appear to be order or customer exports: these are refused before row-level processing to avoid handling buyer PII.
|
|
53
|
+
|
|
54
|
+
It supports current Shopify product-CSV headers and documented legacy aliases. The complete, versioned rule reference is [docs/shopify-product-csv-rules.md](docs/shopify-product-csv-rules.md).
|
|
55
|
+
|
|
56
|
+
## Install
|
|
57
|
+
|
|
58
|
+
Requires Python 3.11 or later.
|
|
59
|
+
|
|
60
|
+
With [uv](https://docs.astral.sh/uv/):
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
uv tool install preflight-kit
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
With pip:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
python -m pip install preflight-kit
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Usage
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
preflight check products.csv --out-dir ./out --lang en --intent new
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Each run writes the following to `--out-dir`:
|
|
79
|
+
|
|
80
|
+
- `fixed_products.csv` — a copy with only unambiguous mechanical fixes applied (currently UTF-8 BOM removal and case-only header normalization).
|
|
81
|
+
- `errors.csv` — machine-readable findings with row, rule, severity, and suggested-fix fields.
|
|
82
|
+
- `report.md` — a human-readable summary.
|
|
83
|
+
|
|
84
|
+
Useful options:
|
|
85
|
+
|
|
86
|
+
- `--out-dir DIR` — output directory (default: `./out`).
|
|
87
|
+
- `--lang en|ja` — report language (default: `ja`).
|
|
88
|
+
- `--no-fix` — report findings without writing `fixed_products.csv`.
|
|
89
|
+
- `--intent new|update|mixed` — choose the import context used for handle and title severity.
|
|
90
|
+
|
|
91
|
+
The command exits with status `1` when it finds a critical issue; otherwise it exits with `0`. A zero exit status means no critical finding was detected within the implemented checks, not that Shopify will necessarily accept or apply the import as intended.
|
|
92
|
+
|
|
93
|
+
For a reproducible example, see the [deliberately messy sample report](examples/reports/preflight-kit-messy-report.md) and its [input CSV](examples/inputs/messy-product-import-sample.csv).
|
|
94
|
+
|
|
95
|
+
## Boundaries and privacy
|
|
96
|
+
|
|
97
|
+
The CLI reads a local file and does not upload it or access a Shopify store. It does not verify live-store behavior. In particular, it cannot check image URL reachability, conflicts with existing store handles, metafield product-reference resolution, or option-position consistency with existing products; every report identifies these limits.
|
|
98
|
+
|
|
99
|
+
Auto-fixes are deliberately limited to proven, unambiguous transformations. Findings that require a business decision are reported but not silently rewritten.
|
|
100
|
+
|
|
101
|
+
## Documentation
|
|
102
|
+
|
|
103
|
+
- [Inspection rules](docs/shopify-product-csv-rules.md)
|
|
104
|
+
- [Change history](CHANGELOG.md)
|
|
105
|
+
- [Contributing guide](CONTRIBUTING.md)
|
|
106
|
+
- [Security policy](SECURITY.md)
|
|
107
|
+
|
|
108
|
+
## Maintenance and support
|
|
109
|
+
|
|
110
|
+
This project is maintained by the GitHub user [q00tar00](https://github.com/q00tar00). The public GitHub repository and its issue tracker are the project’s canonical communication channels.
|
|
111
|
+
|
|
112
|
+
For questions, bug reports, feature requests, or examples of a product-CSV import that went wrong, use [GitHub Issues](https://github.com/q00tar00/preflight-kit/issues). Please use a small redacted reproduction and never post customer, order, access-token, or other sensitive data. Support is provided on a best-effort basis; no response-time commitment is made.
|
|
113
|
+
|
|
114
|
+
## Contributing
|
|
115
|
+
|
|
116
|
+
Contributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) for the supported scope, local setup, test command, and pull-request expectations.
|
|
117
|
+
|
|
118
|
+
## Security
|
|
119
|
+
|
|
120
|
+
Please follow [SECURITY.md](SECURITY.md) for vulnerability reporting. Do not disclose exploitable security details or sensitive CSV data in a public issue.
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
This project is source-available, not open source. See [LICENSE](LICENSE) for permitted use and redistribution terms.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
preflight_kit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
preflight_kit/cli.py,sha256=728CH06hE7uQEuWQA4fTOtTrjU2HEqT3Pz7BvBEff9w,2991
|
|
3
|
+
preflight_kit/engine.py,sha256=YH8fQux93n9ruFbFfIuBDqpGwK4VF5WLvfFVD78axj4,3723
|
|
4
|
+
preflight_kit/fixer.py,sha256=-BmTEmBWtqowoeTHFXWl0-tcPx7nes23G8ZK8lpEc1Q,1920
|
|
5
|
+
preflight_kit/header_registry.py,sha256=hcBDBgPW-cKHXGjLRfgAoEiU7CTQFGKzHU7Ie4Q6MkA,6198
|
|
6
|
+
preflight_kit/json_dump.py,sha256=fF9DsSXO7LAlPxz3SgXdghbpMJLl5CRb4zK3Z1hkVb4,2877
|
|
7
|
+
preflight_kit/loader.py,sha256=12UbZ7vgLODonURlvcSgKs6OZ2xKTjHd_-1S_rOLCeI,11898
|
|
8
|
+
preflight_kit/models.py,sha256=7BX4M0phNTBMz_t9owS1AcMhgcogDUWMQJTE1BdROU4,1848
|
|
9
|
+
preflight_kit/reporters.py,sha256=KvZAOJUgs0c-ckQCALlwYJIh6mfgSu_Ur2TxxfJD8dU,4838
|
|
10
|
+
preflight_kit/rules/__init__.py,sha256=jO8ZwTNJr-OM4tdgMc5--3ZF9KR8o_uIkiUwaRjXe-M,123
|
|
11
|
+
preflight_kit/rules/file_rules.py,sha256=7_6iKFDnWB3R8PqGRvMrCtHZ9t3W_kdCYVzRvtY8pbQ,6935
|
|
12
|
+
preflight_kit/rules/row_rules.py,sha256=hkX4TvBGsz4cLm8LzeHkZjHZzvZ_4zuGLkbagLCPpKY,15941
|
|
13
|
+
preflight_kit-0.2.0.dist-info/METADATA,sha256=5TKraT2dSa6UOUNTrm5Y613S5VjNvppy1hE55OCRJjw,6293
|
|
14
|
+
preflight_kit-0.2.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
15
|
+
preflight_kit-0.2.0.dist-info/entry_points.txt,sha256=_ieCkASN30mnC6EF6Mha5fJVyg30kGOmweeSls2wK0Y,53
|
|
16
|
+
preflight_kit-0.2.0.dist-info/licenses/LICENSE,sha256=6cGI6pIalg6r-jFdDfxXdYbqFX9Gjk_6Rz5o3UhmH-c,1840
|
|
17
|
+
preflight_kit-0.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Shopify Product CSV Preflight Validator — Source-Available License
|
|
2
|
+
Copyright (c) 2026 q00tar00
|
|
3
|
+
|
|
4
|
+
This software is source-available, not open source. The source code is published
|
|
5
|
+
so that you can read it, audit it, and evaluate the tool. It is NOT placed in the
|
|
6
|
+
public domain and no broad license is granted beyond the terms below.
|
|
7
|
+
|
|
8
|
+
1. Permitted use (no charge)
|
|
9
|
+
You may download, build, run, and evaluate this software for your own personal
|
|
10
|
+
or internal business use — for example, to validate your own Shopify product CSV
|
|
11
|
+
files. You may modify your own copy for that purpose.
|
|
12
|
+
|
|
13
|
+
2. Reservation of rights
|
|
14
|
+
All rights not expressly granted above are reserved by the copyright holder.
|
|
15
|
+
|
|
16
|
+
3. Restrictions (require prior written permission)
|
|
17
|
+
Without the copyright holder's prior written permission you may NOT:
|
|
18
|
+
(a) redistribute, resell, sublicense, or publish this software or a derivative
|
|
19
|
+
of it, in source or binary form, whether or not for a fee;
|
|
20
|
+
(b) offer this software (or a derivative) as a hosted or managed service; or
|
|
21
|
+
(c) remove or alter this license or the copyright notice in redistributed copies.
|
|
22
|
+
|
|
23
|
+
4. No warranty
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
26
|
+
FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. A clean report does NOT guarantee
|
|
27
|
+
a successful Shopify import; the tool reads a file and cannot verify live-store
|
|
28
|
+
behavior. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
29
|
+
CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH
|
|
30
|
+
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
+
|
|
32
|
+
For permissions beyond this license, contact the copyright holder via the project's
|
|
33
|
+
GitHub repository: https://github.com/q00tar00/shopify
|