{"id":27446347,"url":"https://github.com/pythonicforge/pyinspect","last_synced_at":"2025-06-14T04:06:15.350Z","repository":{"id":287841107,"uuid":"965901595","full_name":"pythonicforge/Pyinspect","owner":"pythonicforge","description":"The ultimate Python CLI tool for deep-diving into your objects, tracking their mutability, hashability, and more with a single command! 🚀","archived":false,"fork":false,"pushed_at":"2025-04-14T07:39:13.000Z","size":241,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-14T04:05:54.634Z","etag":null,"topics":["cli","python","typescript"],"latest_commit_sha":null,"homepage":"https://pyinspect.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pythonicforge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-14T05:06:44.000Z","updated_at":"2025-04-14T11:25:59.000Z","dependencies_parsed_at":"2025-04-14T08:39:44.890Z","dependency_job_id":"38f7db0f-d133-44a6-9a55-152cdb719227","html_url":"https://github.com/pythonicforge/Pyinspect","commit_stats":null,"previous_names":["pythonicforge/pyinspect"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pythonicforge/Pyinspect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonicforge%2FPyinspect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonicforge%2FPyinspect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonicforge%2FPyinspect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonicforge%2FPyinspect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pythonicforge","download_url":"https://codeload.github.com/pythonicforge/Pyinspect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonicforge%2FPyinspect/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259756872,"owners_count":22906678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","python","typescript"],"created_at":"2025-04-15T04:16:28.581Z","updated_at":"2025-06-14T04:06:15.310Z","avatar_url":"https://github.com/pythonicforge.png","language":"TypeScript","readme":"# PyInspect\n\nPyInspect is a Python-based Command Line Interface (CLI) tool designed to inspect Python objects. It provides detailed information about Python literals and objects, including their type, memory ID, mutability, hashability, size, and available methods. This tool is useful for developers who want to explore and debug Python objects interactively.\n\n\u003cbr/\u003e\n\n### Features\n\n- **Object Inspection**: Analyze Python literals and objects to retrieve detailed information such as type, memory ID, mutability, hashability, size, and methods.\n- **Interactive CLI**: Provides an interactive command-line interface for inspecting objects and executing commands.\n- **Custom Commands**:\n  - `inspect`: Inspect a Python literal or object.\n  - `clear`: Clear the terminal screen.\n  - `bye`: Exit the CLI.\n\n\u003cbr/\u003e\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/pythonicforge/Pyinspect\n   cd Pyinspect\n   ```\n\n2. Install dependencies:\n   Ensure you have Python 3.9+ installed. Install required dependencies using `pip`:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. Run the CLI:\n   ```bash\n   python main.py\n   ```\n\n\u003cbr/\u003e\n\n### Usage\n\nOnce the CLI is running, you can use the following commands:\n\n#### `inspect \u003cobject\u003e`\nInspect a Python literal or object. For example:\n```bash\ninspect [1, 2, 3]\n```\nThis will output:\n- Type of the object\n- Memory ID\n- Hashability\n- Mutability\n- Size in bytes\n- Whether the object is interned\n- List of available methods\n\n#### `clear`\nClears the terminal screen.\n\n#### `bye`\nExits the PyInspect CLI.\n\n\u003cbr/\u003e\n\n### Code Overview\n\n#### `shell.py`\nThe `shell.py` file contains the main implementation of the `PyInspect` CLI. It uses the `cmd` module to provide an interactive shell. Key methods include:\n- `is_hashable`: Checks if an object is hashable.\n- `is_mutable`: Determines if an object is mutable.\n- `is_interned`: Checks if a string object is interned.\n- `get_methods`: Retrieves a list of callable methods for an object.\n- `do_inspect`: Implements the `inspect` command to analyze Python objects.\n- `do_bye`: Implements the `bye` command to exit the CLI.\n- `do_clear`: Implements the `clear` command to clear the terminal.\n\n#### `logger.py`\nThe `logger.py` file (assumed to exist) provides logging functionality for the CLI. It is used to log information, errors, and success messages in a structured format.\n\n\u003cbr/\u003e\n\n### Example\n\nHere is an example session with PyInspect:\n```bash\nWelcome to PyInspect — the Python Object Inspector CLI\nType 'help' to list commands. Type 'bye' to exit.\n\n(pyinspect) inspect {'key': 'value'}\n🔍 Inspecting: {'key': 'value'}\n\n• Type       : \u003cclass 'dict'\u003e\n• Memory ID  : 140123456789456\n• Hashable   : ❌\n• Mutable    : ✅\n• Size       : 240 bytes\n• Interned   : ❌\n• Methods    : clear, copy, fromkeys, get, items, keys, pop, popitem, setdefault, update, values\n\n(pyinspect) bye\nShutting down PyInspect..\nDone!\n```\n\n\u003cbr/\u003e\n\n### Contributing\n\nContributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request.\n\n\u003cbr/\u003e\n\n### License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythonicforge%2Fpyinspect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythonicforge%2Fpyinspect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythonicforge%2Fpyinspect/lists"}