diffx-python 0.5.5__py3-none-macosx_10_12_x86_64.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.
|
Binary file
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: diffx-python
|
|
3
|
+
Version: 0.5.5
|
|
4
|
+
Classifier: Development Status :: 4 - Beta
|
|
5
|
+
Classifier: Intended Audience :: Developers
|
|
6
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
15
|
+
Classifier: Topic :: Text Processing
|
|
16
|
+
Classifier: Topic :: Utilities
|
|
17
|
+
Requires-Dist: pytest>=6.0 ; extra == 'dev'
|
|
18
|
+
Requires-Dist: pytest-cov ; extra == 'dev'
|
|
19
|
+
Requires-Dist: black ; extra == 'dev'
|
|
20
|
+
Requires-Dist: isort ; extra == 'dev'
|
|
21
|
+
Requires-Dist: mypy ; extra == 'dev'
|
|
22
|
+
Requires-Dist: ruff ; extra == 'dev'
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Summary: Python wrapper for diffx - semantic diffing of JSON, YAML, TOML, XML, INI, and CSV files. Focuses on structural meaning rather than formatting.
|
|
25
|
+
Keywords: diff,semantic,json,yaml,toml,xml,ini,csv,structured-data,comparison,devops,ci-cd,automation,data-analysis,configuration
|
|
26
|
+
Author: kako-jun
|
|
27
|
+
License: MIT
|
|
28
|
+
Requires-Python: >=3.8
|
|
29
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
30
|
+
Project-URL: Homepage, https://github.com/kako-jun/diffx
|
|
31
|
+
Project-URL: Repository, https://github.com/kako-jun/diffx
|
|
32
|
+
Project-URL: Issues, https://github.com/kako-jun/diffx/issues
|
|
33
|
+
Project-URL: Documentation, https://github.com/kako-jun/diffx/tree/main/docs
|
|
34
|
+
|
|
35
|
+
# diffx-python
|
|
36
|
+
|
|
37
|
+
Python wrapper for the `diffx` CLI tool - semantic diff for structured data.
|
|
38
|
+
|
|
39
|
+
## Installation
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install diffx-python
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The `diffx` binary is automatically included in the wheel - no additional downloads required! This package uses [maturin](https://github.com/PyO3/maturin) to embed the native binary directly in the Python wheel, similar to tools like `ruff`.
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
import diffx
|
|
51
|
+
|
|
52
|
+
# Compare two JSON files
|
|
53
|
+
result = diffx.diff('file1.json', 'file2.json')
|
|
54
|
+
print(result)
|
|
55
|
+
|
|
56
|
+
# Get structured output as JSON
|
|
57
|
+
json_result = diffx.diff(
|
|
58
|
+
'config1.yaml',
|
|
59
|
+
'config2.yaml',
|
|
60
|
+
diffx.DiffOptions(format='yaml', output='json')
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
for diff_item in json_result:
|
|
64
|
+
if diff_item.added:
|
|
65
|
+
print(f"Added: {diff_item.added}")
|
|
66
|
+
elif diff_item.modified:
|
|
67
|
+
print(f"Modified: {diff_item.modified}")
|
|
68
|
+
|
|
69
|
+
# Compare directory trees
|
|
70
|
+
dir_result = diffx.diff(
|
|
71
|
+
'dir1/',
|
|
72
|
+
'dir2/',
|
|
73
|
+
diffx.DiffOptions(recursive=True, path='config')
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# Compare strings directly
|
|
77
|
+
json1 = '{"name": "Alice", "age": 30}'
|
|
78
|
+
json2 = '{"name": "Alice", "age": 31}'
|
|
79
|
+
string_result = diffx.diff_string(
|
|
80
|
+
json1, json2, 'json',
|
|
81
|
+
diffx.DiffOptions(output='json')
|
|
82
|
+
)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## Features
|
|
87
|
+
|
|
88
|
+
- **Multiple formats**: JSON, YAML, TOML, XML, INI, CSV
|
|
89
|
+
- **Smart diffing**: Understands structure, not just text
|
|
90
|
+
- **Flexible output**: CLI, JSON, YAML, unified diff formats
|
|
91
|
+
- **Advanced options**:
|
|
92
|
+
- Regex-based key filtering
|
|
93
|
+
- Floating-point tolerance
|
|
94
|
+
- Array element identification
|
|
95
|
+
- Path-based filtering
|
|
96
|
+
- **Cross-platform**: Native binary embedded in platform-specific wheels
|
|
97
|
+
|
|
98
|
+
## Key Benefits
|
|
99
|
+
|
|
100
|
+
- **🚀 Zero setup**: No external downloads or binary management
|
|
101
|
+
- **📦 Self-contained**: Everything needed is in the wheel
|
|
102
|
+
- **⚡ Fast installation**: No network dependencies after `pip install`
|
|
103
|
+
- **🔒 Secure**: No runtime downloads from external sources
|
|
104
|
+
- **🌐 Offline-ready**: Works in air-gapped environments
|
|
105
|
+
|
|
106
|
+
## Development
|
|
107
|
+
|
|
108
|
+
To install in development mode:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pip install -e .[dev]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Verification
|
|
115
|
+
|
|
116
|
+
Verify the installation:
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
import diffx
|
|
120
|
+
print("diffx available:", diffx.is_diffx_available())
|
|
121
|
+
print("Version:", diffx.__version__)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
This project is licensed under the MIT License.
|
|
127
|
+
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
diffx_python-0.5.5.data/scripts/diffx,sha256=L-uRCJPZF6Gs-N_otbfl_0vuymOrHDGI3sRaRsD3cpQ,4199096
|
|
2
|
+
diffx_python-0.5.5.dist-info/METADATA,sha256=JMQTlmhHXHcSDf9ZEz6-OiN14aCEHBQK5q7bt1yDX50,3843
|
|
3
|
+
diffx_python-0.5.5.dist-info/WHEEL,sha256=dd8rtIJFWnfzDOgAQwoYfatLKJTFbLjX6PuIZXTAASs,103
|
|
4
|
+
diffx_python-0.5.5.dist-info/RECORD,,
|