{"id":19836454,"url":"https://github.com/mastropinguino/pyinfo","last_synced_at":"2025-10-24T04:04:20.217Z","repository":{"id":62581060,"uuid":"110328533","full_name":"mastropinguino/pyinfo","owner":"mastropinguino","description":"Print python information details like phpinfo","archived":false,"fork":false,"pushed_at":"2020-02-27T15:16:43.000Z","size":10,"stargazers_count":7,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T16:48:44.371Z","etag":null,"topics":["pip","python","systeminfo","wsgi"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mastropinguino.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}},"created_at":"2017-11-11T07:58:15.000Z","updated_at":"2022-06-30T14:43:33.000Z","dependencies_parsed_at":"2022-11-03T21:31:00.414Z","dependency_job_id":null,"html_url":"https://github.com/mastropinguino/pyinfo","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastropinguino%2Fpyinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastropinguino%2Fpyinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastropinguino%2Fpyinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastropinguino%2Fpyinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mastropinguino","download_url":"https://codeload.github.com/mastropinguino/pyinfo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251924542,"owners_count":21665987,"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":["pip","python","systeminfo","wsgi"],"created_at":"2024-11-12T12:11:24.283Z","updated_at":"2025-10-24T04:04:15.162Z","avatar_url":"https://github.com/mastropinguino.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyinfo\nThis library collect all the info for python environment you are running and optionally display them as html page or on terminal for cli program.\nIt could be considered like a python equivalent of phpinfo for php language.\n\n\n## Usage as standalone command\n```bash\n\n$ python -m pyinfo\n============== System information ==============\n     Python version: 3.6.3\n         OS Version: Linux 4.13.11-1-ARCH\n         Executable: /usr/bin/python3\n         Build Date: Oct 24 2017 14:48:20\n           Compiler: GCC 7.2.0\n         Python API: 1013\n...\n\n```\n\n## Usage via python code\n```python\nimport pyinfo\n\n# get the information as object\ninfo = pyinfo.python_info()\n\n# The info dictionary contains all info grouped by topic\n# info = {\n#    'System information': { ... },\n#    'Python internals': { ... },\n#    'OS internals': { ... },\n#    'Environment variables': { ... },\n#    'Database support': { ... },\n#    'Compression and archiving': { ... },\n#    'Socket': { ... },\n#    'Multimedia support': { ... },\n#    'Copyright'\n# }\n\nprint(info['Socket']['Hostname'])\n# \u003e 3.6.3\n\n\n# you can even retrieve the text or html versions\ntext_info = pyinfo.info_as_text()\nprint(text_info)\n\nwith open('/tmp/pyinfo.html', 'w') as f:\n    f.write(pyinfo.info_as_html())\n\n```\n\n## As standalone WSGI app\n```python\ndef application(environ, start_response):\n    import pyinfo\n\n    output = pyinfo.info_as_html()\n\n    start_response('200 OK', [('Content-type', 'text/html')])\n    return [output]\n```\n\nor using a wsgi capable webserver like gunicorn:\n\n```bash\n$ gunicorn pyinfo.wsgi\n```\n\n## Mount into WSGI application\n\nEg. using flask\n```python\n# flask_example.py\n\nfrom flask import Flask\n\napp = Flask(__name__)\n\n\n@app.route('/pyinfo')\ndef info():\n    import pyinfo\n    return pyinfo.info_as_html()\n```\n\nEven with webapp2\n\n```python\n# webapp2_example.py\n\nfrom webapp2 import Route, WSGIApplication\n\nAPP = WSGIApplication([\n    Route('/pyinfo', handler='pyinfo.wsgi.application')\n])\n```\n\n# Installation\n\n```bash\n$ pip install pyinfo\n```\n\n# Contributing\n\nContributions are welcome. Submit via fork and pull request.\n\nIf you're working on something major, shoot me a message beforehand\n\n# CREDITS\n\nThis library is based on the great work made by [@branneman](https://gist.github.com/branneman/951825).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastropinguino%2Fpyinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmastropinguino%2Fpyinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastropinguino%2Fpyinfo/lists"}