{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/16"},{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/10"}],"enrichment":{"capability":"pyp lets you write Python expressions and scripts directly at the shell, automatically handling imports, magic variables for input lines, and intelligent output formatting without requiring explicit print statements.","skillfed_tags":["shell-scripting","one-liners","cli-tool"],"use_cases":["Extract or transform text line-by-line: `ls | pyp 'x.upper()'` or `cat file | pyp 'x.split()[2]'`","Aggregate or filter input: `cat data | pyp 'sum(map(int, lines))'` or `cat words | pyp 'x if \"python\" in x else None'`","Process structured data: `curl api | pyp 'json.load(stdin)[0][\"key\"]'` or `cat file.csv | pyp 'len(lines)'`","Add line numbers or indices: `cat file | pyp 'f\"{idx+1}: {x}\"'`","Understand generated code before execution: `pyp --explain 'complex_expression'` to inspect the AST transformation"],"what_it_does":"pyp is a command-line tool that lets you run Python code directly from the shell without boilerplate. You write a Python expression or snippet, and pyp statically analyzes it to infer what you need: it detects undefined variables like `x` (current line), `lines` (all lines), `stdin`, or `i` (loop index), automatically imports any modules you reference, and executes the code with those bindings in place. The result is printed intelligently\u2014dicts and iterables format nicely, and the last expression prints automatically unless it's None or you explicitly call print yourself.\n\nIt's designed to replace common shell utilities: `ls | pyp 'x[:3]'` acts like cut, `cat file | pyp 'sum(map(int, lines))'` acts like awk, and `cat data.json | pyp 'json.load(stdin)[0]'` acts like jq. You can also use `--explain` to see the generated Python script before running it, chain multiple pyp invocations, or configure a custom config file (via PYP_CONFIG_PATH) to predefine functions and imports for your own use cases.","worth_installing":"Yes, if you regularly write one-liners at the shell and want to avoid boilerplate imports and explicit print statements. The low install friction, permissive license, and lack of known vulnerabilities make it safe to try. The aging maintenance status (595 days since last release) is a minor concern for a stable utility, but the active repository and solid user base suggest it remains reliable for its narrow, well-defined purpose."},"id":"pypyp","links":{"html":"https://skillfed.io/packages/pypyp","md":"https://skillfed.io/packages/pypyp.md","pypi":"https://pypi.org/project/pypyp/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-12-27","license_spdx":null,"license_treatment":"permissive","name":"pypyp","python_support":"supports_current","summary":"Easily run Python at the shell! Magical, but never mysterious."},"popularity":{"monthly_downloads":108435,"position":12558,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.3.0"}
