{"id":16589245,"url":"https://github.com/coldfix/pyval","last_synced_at":"2026-04-21T14:03:50.845Z","repository":{"id":52410878,"uuid":"191205822","full_name":"coldfix/pyval","owner":"coldfix","description":"Print python objects values from command line","archived":false,"fork":false,"pushed_at":"2021-04-29T21:59:52.000Z","size":13,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-11-20T16:05:00.826Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coldfix.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-10T16:32:12.000Z","updated_at":"2019-07-06T00:17:36.000Z","dependencies_parsed_at":"2022-09-05T00:51:25.956Z","dependency_job_id":null,"html_url":"https://github.com/coldfix/pyval","commit_stats":null,"previous_names":[],"tags_count":5,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldfix%2Fpyval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldfix%2Fpyval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldfix%2Fpyval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldfix%2Fpyval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coldfix","download_url":"https://codeload.github.com/coldfix/pyval/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242198763,"owners_count":20088102,"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":[],"created_at":"2024-10-11T23:08:17.818Z","updated_at":"2026-04-21T14:03:50.799Z","avatar_url":"https://github.com/coldfix.png","language":"Python","readme":"pyval\n=====\n\nShow the value of a python object via command line.\n\nExamples:\n\n.. code-block:: bash\n\n    $ pyval sys.platform\n    linux\n\nThis is meant to provide a more convenient alternative to:\n\n.. code-block:: bash\n\n    python -c \"import sys; print(sys.platform)\"\n\nMore complex expressions are possible too:\n\n.. code-block:: bash\n\n    $ pyval math.pi**2\n    9.869604401089358\n\n    $ pyval 'math.sin(math.pi/4)'\n    0.7071067811865475\n\nThe output can be influenced using one of the following command line\narguments:\n\n=========================== ================================================\n``-r, --repr``              Print ``repr(obj)``\n``-j, --json``              Print ``json.dumps(obj)``\n``-p, --pprint``            Print ``pprint(obj)``\n``-f SPEC, --format SPEC``  Print ``format(obj, SPEC)``\n=========================== ================================================\n\n\nInstallation\n------------\n\nThe utility can be installed as follows::\n\n    pip install --user eval\n\nIt is also possible to simply download ``val.py`` and symlink or move under\nthe name of your choice into your PATH, e.g.:\n\n.. code-block:: bash\n\n    wget https://raw.githubusercontent.com/coldfix/pyval/master/val.py \\\n        -O ~/.local/bin/pyval\n\nOnce either of these is done, it can be used within any python enviroment on\nyour system, as long as it is accessible in PATH.\n\nBy default it uses the currently activated environment. In order to use it\nwith unactivated python interpreter, you currently have to call the\ninterpreter manually as follows::\n\n    /path/to/python ~/.local/bin/pyval 'math.sin(math.sin/3)'\n\nThis module is kept deliberately simple and avoids any dependencies not in the\nstandard library. This allows running the script in any python environment\nonce it is installed on the system, without having to install it in each\nenvironment individually.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldfix%2Fpyval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoldfix%2Fpyval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldfix%2Fpyval/lists"}