peta 0.1.0__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.
Files changed (58) hide show
  1. peta-0.1.0/.gitignore +352 -0
  2. peta-0.1.0/LICENSE +21 -0
  3. peta-0.1.0/PKG-INFO +132 -0
  4. peta-0.1.0/README.md +92 -0
  5. peta-0.1.0/pyproject.toml +552 -0
  6. peta-0.1.0/src/peta/__init__.py +1 -0
  7. peta-0.1.0/src/peta/__main__.py +7 -0
  8. peta-0.1.0/src/peta/__metadata__.py +6 -0
  9. peta-0.1.0/src/peta/_version.py +24 -0
  10. peta-0.1.0/src/peta/cli/__init__.py +1 -0
  11. peta-0.1.0/src/peta/cli/app.py +214 -0
  12. peta-0.1.0/src/peta/cli/commands/__init__.py +1 -0
  13. peta-0.1.0/src/peta/cli/commands/compare.py +70 -0
  14. peta-0.1.0/src/peta/cli/commands/deps.py +81 -0
  15. peta-0.1.0/src/peta/cli/commands/files.py +28 -0
  16. peta-0.1.0/src/peta/cli/commands/info.py +59 -0
  17. peta-0.1.0/src/peta/cli/commands/versions.py +161 -0
  18. peta-0.1.0/src/peta/cli/output/__init__.py +1 -0
  19. peta-0.1.0/src/peta/cli/output/console.py +42 -0
  20. peta-0.1.0/src/peta/cli/output/json.py +115 -0
  21. peta-0.1.0/src/peta/cli/output/tables.py +206 -0
  22. peta-0.1.0/src/peta/cli/state.py +14 -0
  23. peta-0.1.0/src/peta/core/__init__.py +1 -0
  24. peta-0.1.0/src/peta/core/deptree.py +215 -0
  25. peta-0.1.0/src/peta/core/enrich.py +46 -0
  26. peta-0.1.0/src/peta/core/local.py +77 -0
  27. peta-0.1.0/src/peta/core/models.py +54 -0
  28. peta-0.1.0/src/peta/core/osv.py +144 -0
  29. peta-0.1.0/src/peta/core/remote.py +176 -0
  30. peta-0.1.0/src/peta/core/resolve.py +81 -0
  31. peta-0.1.0/src/peta/core/stats.py +143 -0
  32. peta-0.1.0/src/peta/core/vulns.py +74 -0
  33. peta-0.1.0/src/peta/py.typed +0 -0
  34. peta-0.1.0/tests/__init__.py +1 -0
  35. peta-0.1.0/tests/conftest.py +3 -0
  36. peta-0.1.0/tests/e2e/__init__.py +1 -0
  37. peta-0.1.0/tests/e2e/test_cli_local.py +33 -0
  38. peta-0.1.0/tests/e2e/test_cli_remote.py +61 -0
  39. peta-0.1.0/tests/integration/__init__.py +1 -0
  40. peta-0.1.0/tests/integration/test_local_real.py +27 -0
  41. peta-0.1.0/tests/integration/test_pipeline.py +54 -0
  42. peta-0.1.0/tests/smoke/__init__.py +1 -0
  43. peta-0.1.0/tests/smoke/test_smoke.py +21 -0
  44. peta-0.1.0/tests/unit/__init__.py +1 -0
  45. peta-0.1.0/tests/unit/test_cli.py +514 -0
  46. peta-0.1.0/tests/unit/test_deptree.py +139 -0
  47. peta-0.1.0/tests/unit/test_enrich.py +71 -0
  48. peta-0.1.0/tests/unit/test_local.py +77 -0
  49. peta-0.1.0/tests/unit/test_models.py +63 -0
  50. peta-0.1.0/tests/unit/test_osv.py +131 -0
  51. peta-0.1.0/tests/unit/test_output_console.py +47 -0
  52. peta-0.1.0/tests/unit/test_output_json.py +114 -0
  53. peta-0.1.0/tests/unit/test_output_tables.py +157 -0
  54. peta-0.1.0/tests/unit/test_remote.py +115 -0
  55. peta-0.1.0/tests/unit/test_resolve.py +82 -0
  56. peta-0.1.0/tests/unit/test_stats.py +134 -0
  57. peta-0.1.0/tests/unit/test_versions_fetch.py +137 -0
  58. peta-0.1.0/tests/unit/test_vulns.py +90 -0
peta-0.1.0/.gitignore ADDED
@@ -0,0 +1,352 @@
1
+ # >>> cobo:begin >>>
2
+ # Generated by cobo (github.com/hasansezertasan/cobo)
3
+ # gitignore/macOS@57286c3 — https://raw.githubusercontent.com/github/gitignore/57286c3887203259752b747db94e6c3ad10ec53d/Global/macOS.gitignore
4
+ # General
5
+ .DS_Store
6
+ .localized
7
+ __MACOSX/
8
+ .AppleDouble
9
+ .LSOverride
10
+ Icon[
11
+ ]
12
+
13
+ # Resource forks
14
+ ._*
15
+
16
+ # Files and directories that might appear in the root of a volume
17
+ .DocumentRevisions-V100
18
+ .fseventsd
19
+ .Spotlight-V100
20
+ .TemporaryItems
21
+ .Trashes
22
+ .VolumeIcon.icns
23
+ .com.apple.timemachine.donotpresent
24
+ .com.apple.timemachine.supported
25
+ .PKInstallSandboxManager
26
+ .PKInstallSandboxManager-SystemSoftware
27
+ .hotfiles.btree
28
+ .vol
29
+ .file
30
+ .disk_label*
31
+ lost+found
32
+ .HFS+ Private Directory Data[
33
+ ]
34
+
35
+ # Directories potentially created on remote AFP share
36
+ .AppleDB
37
+ .AppleDesktop
38
+ Network Trash Folder
39
+ Temporary Items
40
+ .apdisk
41
+
42
+ # Mac OS 6 to 9
43
+ Desktop DB
44
+ Desktop DF
45
+ TheFindByContentFolder
46
+ TheVolumeSettingsFolder
47
+ .FBCIndex
48
+ .FBCSemaphoreFile
49
+ .FBCLockFolder
50
+
51
+ # Quota system
52
+ .quota.group
53
+ .quota.user
54
+ .quota.ops.group
55
+ .quota.ops.user
56
+
57
+ # TimeMachine
58
+ Backups.backupdb
59
+ .MobileBackups
60
+ .MobileBackups.trash
61
+ MobileBackups.trash
62
+ tmbootpicker.efi
63
+
64
+ # Generated by cobo (github.com/hasansezertasan/cobo)
65
+ # gitignore/Windows@57286c3 — https://raw.githubusercontent.com/github/gitignore/57286c3887203259752b747db94e6c3ad10ec53d/Global/Windows.gitignore
66
+ # Windows thumbnail cache files
67
+ Thumbs.db
68
+ Thumbs.db:encryptable
69
+ ehthumbs.db
70
+ ehthumbs_vista.db
71
+
72
+ # Dump file
73
+ *.stackdump
74
+
75
+ # Folder config file
76
+ [Dd]esktop.ini
77
+
78
+ # Recycle Bin used on file shares
79
+ $RECYCLE.BIN/
80
+
81
+ # Windows Installer files
82
+ *.cab
83
+ *.msi
84
+ *.msix
85
+ *.msm
86
+ *.msp
87
+
88
+ # Windows shortcuts
89
+ *.lnk
90
+
91
+ # Generated by cobo (github.com/hasansezertasan/cobo)
92
+ # gitignore/Linux@57286c3 — https://raw.githubusercontent.com/github/gitignore/57286c3887203259752b747db94e6c3ad10ec53d/Global/Linux.gitignore
93
+ *~
94
+
95
+ # temporary files which can be created if a process still has a handle open of a deleted file
96
+ .fuse_hidden*
97
+
98
+ # Metadata left by Dolphin file manager, which comes with KDE Plasma
99
+ .directory
100
+
101
+ # Linux trash folder which might appear on any partition or disk
102
+ .Trash-*
103
+
104
+ # .nfs files are created when an open file is removed but is still being accessed
105
+ .nfs*
106
+
107
+ # Log files created by default by the nohup command
108
+ nohup.out
109
+
110
+ # Generated by cobo (github.com/hasansezertasan/cobo)
111
+ # gitignore/VisualStudioCode@57286c3 — https://raw.githubusercontent.com/github/gitignore/57286c3887203259752b747db94e6c3ad10ec53d/Global/VisualStudioCode.gitignore
112
+ # Visual Studio Code
113
+ .vscode/*
114
+ !.vscode/settings.json
115
+ !.vscode/tasks.json
116
+ !.vscode/launch.json
117
+ !.vscode/extensions.json
118
+ !.vscode/*.code-snippets
119
+ !*.code-workspace
120
+
121
+ # Built Visual Studio Code Extensions
122
+ *.vsix
123
+
124
+ # Generated by cobo (github.com/hasansezertasan/cobo)
125
+ # gitignore/Python@57286c3 — https://raw.githubusercontent.com/github/gitignore/57286c3887203259752b747db94e6c3ad10ec53d/Python.gitignore
126
+ # Byte-compiled / optimized / DLL files
127
+ __pycache__/
128
+ *.py[codz]
129
+ *$py.class
130
+
131
+ # C extensions
132
+ *.so
133
+
134
+ # Distribution / packaging
135
+ .Python
136
+ build/
137
+ develop-eggs/
138
+ dist/
139
+ downloads/
140
+ eggs/
141
+ .eggs/
142
+ lib/
143
+ lib64/
144
+ parts/
145
+ sdist/
146
+ var/
147
+ wheels/
148
+ share/python-wheels/
149
+ *.egg-info/
150
+ .installed.cfg
151
+ *.egg
152
+ MANIFEST
153
+
154
+ # PyInstaller
155
+ # Usually these files are written by a python script from a template
156
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
157
+ *.manifest
158
+ *.spec
159
+
160
+ # Installer logs
161
+ pip-log.txt
162
+ pip-delete-this-directory.txt
163
+
164
+ # Unit test / coverage reports
165
+ htmlcov/
166
+ .tox/
167
+ .nox/
168
+ .coverage
169
+ .coverage.*
170
+ .cache
171
+ nosetests.xml
172
+ coverage.xml
173
+ *.cover
174
+ *.py.cover
175
+ *.lcov
176
+ .hypothesis/
177
+ .pytest_cache/
178
+ cover/
179
+
180
+ # Translations
181
+ *.mo
182
+ *.pot
183
+
184
+ # Django stuff:
185
+ *.log
186
+ local_settings.py
187
+ db.sqlite3
188
+ db.sqlite3-journal
189
+
190
+ # Flask stuff:
191
+ instance/
192
+ .webassets-cache
193
+
194
+ # Scrapy stuff:
195
+ .scrapy
196
+
197
+ # Sphinx documentation
198
+ docs/_build/
199
+
200
+ # PyBuilder
201
+ .pybuilder/
202
+ target/
203
+
204
+ # Jupyter Notebook
205
+ .ipynb_checkpoints
206
+
207
+ # IPython
208
+ profile_default/
209
+ ipython_config.py
210
+
211
+ # pyenv
212
+ # For a library or package, you might want to ignore these files since the code is
213
+ # intended to run in multiple environments; otherwise, check them in:
214
+ # .python-version
215
+
216
+ # pipenv
217
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
218
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
219
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
220
+ # install all needed dependencies.
221
+ # Pipfile.lock
222
+
223
+ # UV
224
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
225
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
226
+ # commonly ignored for libraries.
227
+ # uv.lock
228
+
229
+ # poetry
230
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
231
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
232
+ # commonly ignored for libraries.
233
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
234
+ # poetry.lock
235
+ # poetry.toml
236
+
237
+ # pdm
238
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
239
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
240
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
241
+ # pdm.lock
242
+ # pdm.toml
243
+ .pdm-python
244
+ .pdm-build/
245
+
246
+ # pixi
247
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
248
+ # pixi.lock
249
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
250
+ # in the .venv directory. It is recommended not to include this directory in version control.
251
+ .pixi/*
252
+ !.pixi/config.toml
253
+
254
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
255
+ __pypackages__/
256
+
257
+ # Celery stuff
258
+ celerybeat-schedule*
259
+ celerybeat.pid
260
+
261
+ # Redis
262
+ *.rdb
263
+ *.aof
264
+ *.pid
265
+
266
+ # RabbitMQ
267
+ mnesia/
268
+ rabbitmq/
269
+ rabbitmq-data/
270
+
271
+ # ActiveMQ
272
+ activemq-data/
273
+
274
+ # SageMath parsed files
275
+ *.sage.py
276
+
277
+ # Environments
278
+ .env
279
+ .envrc
280
+ .venv
281
+ env/
282
+ venv/
283
+ ENV/
284
+ env.bak/
285
+ venv.bak/
286
+
287
+ # Spyder project settings
288
+ .spyderproject
289
+ .spyproject
290
+
291
+ # Rope project settings
292
+ .ropeproject
293
+
294
+ # mkdocs documentation
295
+ /site
296
+
297
+ # mypy
298
+ .mypy_cache/
299
+ .dmypy.json
300
+ dmypy.json
301
+
302
+ # Pyre type checker
303
+ .pyre/
304
+
305
+ # pytype static type analyzer
306
+ .pytype/
307
+
308
+ # Cython debug symbols
309
+ cython_debug/
310
+
311
+ # PyCharm
312
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
313
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
314
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
315
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
316
+ # .idea/
317
+
318
+ # Abstra
319
+ # Abstra is an AI-powered process automation framework.
320
+ # Ignore directories containing user credentials, local state, and settings.
321
+ # Learn more at https://abstra.io/docs
322
+ .abstra/
323
+
324
+ # Visual Studio Code
325
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
326
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
327
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
328
+ # you could uncomment the following to ignore the entire vscode folder
329
+ # .vscode/
330
+ # Temporary file for partial code execution
331
+ tempCodeRunnerFile.py
332
+
333
+ # Ruff stuff:
334
+ .ruff_cache/
335
+
336
+ # PyPI configuration file
337
+ .pypirc
338
+
339
+ # Marimo
340
+ marimo/_static/
341
+ marimo/_lsp/
342
+ __marimo__/
343
+
344
+ # Streamlit
345
+ .streamlit/secrets.toml
346
+ # <<< cobo:end sha256=ad0ebe7dcb4b7d3ea51c692fbd995c90642a0f84ab813436d7e3da3b1610be93 <<<
347
+
348
+ ### Generated by the author
349
+ # MegaLinter local report output (REPORT_OUTPUT_FOLDER in .mega-linter.yml)
350
+ megalinter-reports/
351
+ src/**/_version.py
352
+ mise.local.toml
peta-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-present Hasan Sezer Tasan <hasansezertasan@gmail.com>
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.
peta-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,132 @@
1
+ Metadata-Version: 2.4
2
+ Name: peta
3
+ Version: 0.1.0
4
+ Summary: Human-friendly Python package metadata viewer
5
+ Project-URL: changelog, https://github.com/hasansezertasan/peta/blob/main/CHANGELOG.md
6
+ Project-URL: documentation, https://hasansezertasan.github.io/peta
7
+ Project-URL: homepage, https://github.com/hasansezertasan/peta
8
+ Project-URL: issues, https://github.com/hasansezertasan/peta/issues
9
+ Project-URL: releasenotes, https://github.com/hasansezertasan/peta/releases
10
+ Project-URL: source, https://github.com/hasansezertasan/peta.git
11
+ Author-email: Hasan Sezer Tasan <hasansezertasan@gmail.com>
12
+ Maintainer-email: Hasan Sezer Tasan <hasansezertasan@gmail.com>
13
+ License-Expression: MIT
14
+ License-File: LICENSE
15
+ Keywords: cli,command-line,metadata,packaging,pypi,python,typer
16
+ Classifier: Development Status :: 3 - Alpha
17
+ Classifier: Environment :: Console
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Intended Audience :: Information Technology
20
+ Classifier: Intended Audience :: System Administrators
21
+ Classifier: License :: OSI Approved :: MIT License
22
+ Classifier: Natural Language :: English
23
+ Classifier: Operating System :: OS Independent
24
+ Classifier: Programming Language :: Python :: 3
25
+ Classifier: Programming Language :: Python :: 3 :: Only
26
+ Classifier: Programming Language :: Python :: 3.14
27
+ Classifier: Programming Language :: Python :: Implementation :: CPython
28
+ Classifier: Topic :: Software Development
29
+ Classifier: Topic :: Software Development :: Libraries
30
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
31
+ Classifier: Topic :: Terminals
32
+ Classifier: Topic :: Utilities
33
+ Classifier: Typing :: Typed
34
+ Requires-Python: >=3.14
35
+ Requires-Dist: httpx
36
+ Requires-Dist: packaging
37
+ Requires-Dist: rich
38
+ Requires-Dist: typer
39
+ Description-Content-Type: text/markdown
40
+
41
+ # peta
42
+
43
+ [![CI](https://github.com/hasansezertasan/peta/actions/workflows/ci.yml/badge.svg)](https://github.com/hasansezertasan/peta/actions/workflows/ci.yml)
44
+ [![Coverage](https://img.shields.io/codecov/c/github/hasansezertasan/peta)](https://codecov.io/gh/hasansezertasan/peta)
45
+ [![Documentation Status](https://img.shields.io/github/deployments/hasansezertasan/peta/github-pages?label=docs)](https://hasansezertasan.github.io/peta)
46
+ [![PyPI - Version](https://img.shields.io/pypi/v/peta.svg)](https://pypi.org/project/peta)
47
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/peta.svg)](https://pypi.org/project/peta)
48
+ [![License - MIT](https://img.shields.io/github/license/hasansezertasan/peta.svg)](https://opensource.org/licenses/MIT)
49
+ [![GitHub Stars](https://img.shields.io/github/stars/hasansezertasan/peta?style=social)](https://github.com/hasansezertasan/peta/stargazers)
50
+ [![Latest Commit](https://img.shields.io/github/last-commit/hasansezertasan/peta)](https://github.com/hasansezertasan/peta)
51
+
52
+ [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
53
+ [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
54
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/hasansezertasan/peta/badge)](https://scorecard.dev/viewer/?uri=github.com/hasansezertasan/peta)
55
+ [![GitHub Tag](https://img.shields.io/github/tag/hasansezertasan/peta?include_prereleases=&sort=semver&color=black)](https://github.com/hasansezertasan/peta/releases/)
56
+
57
+ [![Downloads](https://pepy.tech/badge/peta)](https://pepy.tech/project/peta)
58
+ [![Downloads/Month](https://pepy.tech/badge/peta/month)](https://pepy.tech/project/peta)
59
+ [![Downloads/Week](https://pepy.tech/badge/peta/week)](https://pepy.tech/project/peta)
60
+
61
+ **Human-friendly Python package metadata viewer.** Think `cargo info` for Python.
62
+
63
+ `peta` shows detailed metadata for a Python package — from your local environment
64
+ or from PyPI — with clean, Rich-formatted terminal output.
65
+
66
+ ## Features
67
+
68
+ - **Local + remote** — inspect installed packages or any package on PyPI
69
+ - **Rich output** — readable tables, panels, and trees
70
+ - **Dependency listing** — see a package's declared dependencies
71
+ - **File listing** — list files installed by a local package
72
+ - **Version listing** — browse published versions from PyPI
73
+ - **JSON output** — `--json` on every command for scripting
74
+
75
+ ## Installation
76
+
77
+ `peta` is an end-user CLI tool; install it into an isolated environment:
78
+
79
+ ```bash
80
+ # Run without installing
81
+ uvx peta requests
82
+
83
+ # Install as a tool
84
+ uv tool install peta
85
+ pipx install peta
86
+ ```
87
+
88
+ On macOS/Linux via [Homebrew](https://github.com/hasansezertasan/homebrew-tap):
89
+
90
+ ```bash
91
+ brew install hasansezertasan/tap/peta
92
+ ```
93
+
94
+ On Windows via [Scoop](https://github.com/hasansezertasan/scoop-bucket):
95
+
96
+ ```bash
97
+ scoop bucket add hasansezertasan https://github.com/hasansezertasan/scoop-bucket
98
+ scoop install peta
99
+ ```
100
+
101
+ **Requires:** Python 3.14+
102
+
103
+ ## Usage
104
+
105
+ ```bash
106
+ peta requests # info (local first, falls back to PyPI)
107
+ peta info requests # explicit info
108
+ peta info requests==2.31.0 # a specific version from PyPI
109
+ peta deps flask # recursive dependency tree
110
+ peta deps flask --why certifi # why is certifi pulled in?
111
+ peta files rich # files installed locally
112
+ peta versions httpx # published versions on PyPI
113
+ peta compare requests httpx # side-by-side metadata comparison
114
+ peta requests --json # machine-readable output
115
+ ```
116
+
117
+ ### Flags
118
+
119
+ | Flag | Applies to | Meaning |
120
+ | ------ | ----------- | --------- |
121
+ | `--json` | all | JSON output |
122
+ | `--local` / `-l` | info, deps | force local lookup |
123
+ | `--remote` / `-r` | info, deps | force PyPI lookup |
124
+ | `--limit` / `-n` | versions | max versions to show (default 20) |
125
+ | `--why <target>` | deps | show why `<target>` is a dependency |
126
+ | `--depth <n>` | deps | max recursion depth (default 10) |
127
+ | `--no-color` | (root) | disable colored output (also via `NO_COLOR`) |
128
+ | `--version` / `-V` | (root) | print version and exit |
129
+
130
+ ## License
131
+
132
+ MIT
peta-0.1.0/README.md ADDED
@@ -0,0 +1,92 @@
1
+ # peta
2
+
3
+ [![CI](https://github.com/hasansezertasan/peta/actions/workflows/ci.yml/badge.svg)](https://github.com/hasansezertasan/peta/actions/workflows/ci.yml)
4
+ [![Coverage](https://img.shields.io/codecov/c/github/hasansezertasan/peta)](https://codecov.io/gh/hasansezertasan/peta)
5
+ [![Documentation Status](https://img.shields.io/github/deployments/hasansezertasan/peta/github-pages?label=docs)](https://hasansezertasan.github.io/peta)
6
+ [![PyPI - Version](https://img.shields.io/pypi/v/peta.svg)](https://pypi.org/project/peta)
7
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/peta.svg)](https://pypi.org/project/peta)
8
+ [![License - MIT](https://img.shields.io/github/license/hasansezertasan/peta.svg)](https://opensource.org/licenses/MIT)
9
+ [![GitHub Stars](https://img.shields.io/github/stars/hasansezertasan/peta?style=social)](https://github.com/hasansezertasan/peta/stargazers)
10
+ [![Latest Commit](https://img.shields.io/github/last-commit/hasansezertasan/peta)](https://github.com/hasansezertasan/peta)
11
+
12
+ [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
13
+ [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
14
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/hasansezertasan/peta/badge)](https://scorecard.dev/viewer/?uri=github.com/hasansezertasan/peta)
15
+ [![GitHub Tag](https://img.shields.io/github/tag/hasansezertasan/peta?include_prereleases=&sort=semver&color=black)](https://github.com/hasansezertasan/peta/releases/)
16
+
17
+ [![Downloads](https://pepy.tech/badge/peta)](https://pepy.tech/project/peta)
18
+ [![Downloads/Month](https://pepy.tech/badge/peta/month)](https://pepy.tech/project/peta)
19
+ [![Downloads/Week](https://pepy.tech/badge/peta/week)](https://pepy.tech/project/peta)
20
+
21
+ **Human-friendly Python package metadata viewer.** Think `cargo info` for Python.
22
+
23
+ `peta` shows detailed metadata for a Python package — from your local environment
24
+ or from PyPI — with clean, Rich-formatted terminal output.
25
+
26
+ ## Features
27
+
28
+ - **Local + remote** — inspect installed packages or any package on PyPI
29
+ - **Rich output** — readable tables, panels, and trees
30
+ - **Dependency listing** — see a package's declared dependencies
31
+ - **File listing** — list files installed by a local package
32
+ - **Version listing** — browse published versions from PyPI
33
+ - **JSON output** — `--json` on every command for scripting
34
+
35
+ ## Installation
36
+
37
+ `peta` is an end-user CLI tool; install it into an isolated environment:
38
+
39
+ ```bash
40
+ # Run without installing
41
+ uvx peta requests
42
+
43
+ # Install as a tool
44
+ uv tool install peta
45
+ pipx install peta
46
+ ```
47
+
48
+ On macOS/Linux via [Homebrew](https://github.com/hasansezertasan/homebrew-tap):
49
+
50
+ ```bash
51
+ brew install hasansezertasan/tap/peta
52
+ ```
53
+
54
+ On Windows via [Scoop](https://github.com/hasansezertasan/scoop-bucket):
55
+
56
+ ```bash
57
+ scoop bucket add hasansezertasan https://github.com/hasansezertasan/scoop-bucket
58
+ scoop install peta
59
+ ```
60
+
61
+ **Requires:** Python 3.14+
62
+
63
+ ## Usage
64
+
65
+ ```bash
66
+ peta requests # info (local first, falls back to PyPI)
67
+ peta info requests # explicit info
68
+ peta info requests==2.31.0 # a specific version from PyPI
69
+ peta deps flask # recursive dependency tree
70
+ peta deps flask --why certifi # why is certifi pulled in?
71
+ peta files rich # files installed locally
72
+ peta versions httpx # published versions on PyPI
73
+ peta compare requests httpx # side-by-side metadata comparison
74
+ peta requests --json # machine-readable output
75
+ ```
76
+
77
+ ### Flags
78
+
79
+ | Flag | Applies to | Meaning |
80
+ | ------ | ----------- | --------- |
81
+ | `--json` | all | JSON output |
82
+ | `--local` / `-l` | info, deps | force local lookup |
83
+ | `--remote` / `-r` | info, deps | force PyPI lookup |
84
+ | `--limit` / `-n` | versions | max versions to show (default 20) |
85
+ | `--why <target>` | deps | show why `<target>` is a dependency |
86
+ | `--depth <n>` | deps | max recursion depth (default 10) |
87
+ | `--no-color` | (root) | disable colored output (also via `NO_COLOR`) |
88
+ | `--version` / `-V` | (root) | print version and exit |
89
+
90
+ ## License
91
+
92
+ MIT