jtable 0.10.125__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Vincent Tougne
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ include README.md
2
+ include LICENSE.txt
3
+ include dependencies/requirements.txt
4
+ include dependencies/*.whl
5
+ include dependencies/*.tar.gz
6
+ recursive-include jtable/resources *
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: jtable
3
+ Version: 0.10.125
4
+ Summary: Tabulate JSON data and transform them using Jinja templates.
5
+ Home-page: https://github.com/vtougne/jtable
6
+ Author: Vincent Tougne
7
+ Author-email: vtougne@gmail.com
8
+ License: MIT
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ License-File: LICENSE.txt
13
+ Provides-Extra: all
14
+ Requires-Dist: xmltodict; extra == "all"
15
+ Requires-Dist: html-to-json; extra == "all"
16
+ Provides-Extra: xmltodict
17
+ Requires-Dist: xmltodict; extra == "xmltodict"
18
+ Provides-Extra: html-to-json
19
+ Requires-Dist: html-to-json; extra == "html-to-json"
20
+ Dynamic: author
21
+ Dynamic: author-email
22
+ Dynamic: classifier
23
+ Dynamic: home-page
24
+ Dynamic: license
25
+ Dynamic: license-file
26
+ Dynamic: provides-extra
27
+ Dynamic: summary
@@ -0,0 +1,82 @@
1
+ # Jtable
2
+
3
+ ![Colored Table Example](doc/examples/uptime_view_colored.png)
4
+
5
+ Jtable helps you render tables from key/value sources like JSON, YAML, and Python dictionaries.
6
+ It works as a CLI tool, a Jinja filter (usable in Ansible, Django, Flask, etc.), or a Python module.
7
+
8
+ ---
9
+
10
+ ## Features
11
+ - Render tables from JSON, YAML, or Python objects
12
+ - CLI usage, Jinja filter, or Python import
13
+ - Conditional coloring and formatting (see screenshot above)
14
+ - Advanced selection, filtering, and transformation with query files
15
+ - Output formats: plain, JSON, HTML, GitHub, LaTeX, etc.
16
+ - Multi-file loading and aggregation
17
+ - Integration with Ansible and other Python frameworks
18
+ - Inspect and explore nested data structures
19
+
20
+ ---
21
+
22
+ ## Quick Install
23
+ ```bash
24
+ pip install jtable
25
+ ```
26
+ Or clone and use locally:
27
+ ```bash
28
+ git clone <repo_url>
29
+ cd jtable
30
+ pip install -r requirements.txt
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Basic Usage
36
+
37
+ ```yaml
38
+ - hostname: host_1
39
+ os: linux
40
+ cost: 5000
41
+ state: alive
42
+ env: qua
43
+ - hostname: host_2
44
+ os: linux
45
+ cost: 5000
46
+ state: alive
47
+ env: qua
48
+ - hostname: host_3
49
+ os: linux
50
+ state: unreachable
51
+ env: qua
52
+ ```
53
+
54
+ ```bash
55
+ cat host_dataset.yml | jtable
56
+ ```
57
+
58
+ Output:
59
+ ```text
60
+ hostname os cost state env
61
+ ---------- ----- ------ ----------- -----
62
+ host_1 linux 5000 alive qua
63
+ host_2 linux 5000 alive qua
64
+ host_3 linux unreachable qua
65
+ ```
66
+
67
+ ---
68
+
69
+ ## More Examples
70
+ - [Setup Guide](./doc/setup/README.md)
71
+ - [Advanced Examples](./doc/examples/README.md)
72
+
73
+ ---
74
+
75
+ ## Contributing
76
+ Pull requests and issues are welcome! For major changes, please open an issue first to discuss what you would like to change.
77
+
78
+ ---
79
+
80
+ ## License
81
+ See [LICENSE.txt](LICENSE.txt)
82
+
File without changes
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env python3
2
+ import jtable.main
3
+
4
+ jtable.main.main()