{"id":13813477,"url":"https://github.com/pytest-dev/pytest-echo","last_synced_at":"2025-07-10T12:33:40.456Z","repository":{"id":57456506,"uuid":"22609199","full_name":"pytest-dev/pytest-echo","owner":"pytest-dev","description":"pytest plugin to dump environment variables, package version and generic attributes.","archived":false,"fork":false,"pushed_at":"2025-04-27T09:51:48.000Z","size":235,"stargazers_count":21,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-06-09T23:08:21.742Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pytest-dev.github.io/pytest-echo/","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/pytest-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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}},"created_at":"2014-08-04T15:24:11.000Z","updated_at":"2025-04-27T09:50:01.000Z","dependencies_parsed_at":"2025-02-10T16:40:35.608Z","dependency_job_id":null,"html_url":"https://github.com/pytest-dev/pytest-echo","commit_stats":{"total_commits":71,"total_committers":2,"mean_commits":35.5,"dds":"0.12676056338028174","last_synced_commit":"1e8fe11b31c3408f80c69fc07a00d5b85c96e2e3"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/pytest-dev/pytest-echo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-echo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-echo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-echo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-echo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pytest-dev","download_url":"https://codeload.github.com/pytest-dev/pytest-echo/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytest-dev%2Fpytest-echo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264578875,"owners_count":23631555,"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-08-04T04:01:19.032Z","updated_at":"2025-07-10T12:33:40.449Z","avatar_url":"https://github.com/pytest-dev.png","language":"Python","readme":"# pytest-echo\n\n[![PyPI](https://img.shields.io/pypi/v/pytest-echo?style=flat-square)](https://pypi.org/project/pytest-echo/)\n[![Supported Python\nversions](https://img.shields.io/pypi/pyversions/pytest-echo.svg)](https://pypi.org/project/pytest-echo/)\n[![tests](https://github.com/pytest-dev/pytest-echo/actions/workflows/tests.yml/badge.svg)](https://github.com/pytest-dev/pytest-echo/actions/workflows/tests.yml)\n[![Downloads](https://static.pepy.tech/badge/pytest-echo/month)](https://pepy.tech/project/pytest-echo)\n[![Coverage](https://codecov.io/gh/pytest-dev/pytest-echo/branch/develop/graph/badge.svg)](https://codecov.io/gh/pytest-dev/pytest-echo)\n[![Documentation](https://github.com/pytest-dev/pytest-echo/actions/workflows/docs.yml/badge.svg)](https://pytest-dev.github.io/pytest-echo/)\n\nPrint environment variables, package version and generic attributes,\nas they are at the beginning of the test.\n\nUseful in the continuous integration to dump test\nconfiguration/environment and or to check if attributes are properly set\n(ie. you change environment with `os.environ`)\n\n## Install\n\ninstall via::\n\n    pip install pytest-echo\n\n## Examples\n\n### Dump environment variables\n\n    $ pytest --echo-env=HOME\n    ============================= test session starts =========================\n    platform linux2 -- Python 2.7.4 -- py-1.4.22 -- pytest-2.6.0 -- /bin/python\n    Environment:\n        HOME: /Users/sax\n    plugins: echo, pydev, cov, cache, django\n\n### Dump package version\n\n    $ pytest --echo-version=pytest_echo\n    ============================= test session starts =========================\n    platform linux2 -- Python 2.7.4 -- py-1.4.22 -- pytest-2.6.0 -- /bin/python\n    Package version:\n        pytest_echo: 0.1\n    plugins: echo, pydev, cov, cache, django\n\n\u003e [!NOTE]\n\u003e The first attempt to retrieve the version is done via setuptools\n\u003e if it fails, the module is imported (`__import__(package)`) to retrieve the version reading\n\u003e `get_version`, `__version__`, `VERSION`, `version` so any module\n\u003e level code is executed. This should be not an issue as no problematic code\n\u003e should be present in the first level of the package\n\n### Dump attributes\n\n    $ pytest --echo-attr=django.conf.settings.DEBUG\n    ============================= test session starts =========================\n    platform linux2 -- Python 2.7.4 -- py-1.4.22 -- pytest-2.6.0 -- /bin/python\n    Inspections\n        django.conf.settings.DEBUG: False\n    plugins: echo, pydev, cov, cache, django\n\n\u003e [!NOTE]\n\u003e Be careful when use `--echo-attr`. It loads any module in the path and this will execute any module level code\n\u003e If you try to dump a property, related `getter` will be executed.\n\n\u003e [!NOTE] You cannot dump callable result.\n\n### Configure via tox.ini/setup.cfg/pytest.cfg\n\nExample of use in a django project:\n\n    [pytest]\n    addopts = -vvv\n            --tb=short\n            --capture=no\n            --echo-env PWD\n            --echo-env VIRTUAL_ENV\n            --echo-env DBENGINE\n            --echo-version django\n            --echo-version pip\n            --echo-version pytest-echo\n            --echo-attr django.conf.settings.DATABASES.default.ENGINE\n\n\n\n    $ pytest\n    ============================= test session starts =========================\n    platform linux2 -- Python 2.7.4 -- py-1.4.22 -- pytest-2.6.0 -- /bin/python\n    Environment:\n        DJANGO_SETTINGS_MODULE: tests.settings\n        PWD: /data/PROGETTI/sem\n        VIRTUAL_ENV: /data/VENV/sem\n        DBENGINE: \u003cnot set\u003e\n    Package version:\n        django: 1.6.5\n        pip: 1.5.6\n        pytest_echo: 1.2\n    Inspections:\n        django.conf.settings.DATABASES.default.ENGINE: 'django.db.backends.postgresql_psycopg2'\n    plugins: echo, cache, capturelog, contextfixture, cov, django, pydev\n    collected 14 items\n    .............\n    14 passed in 4.95 seconds\n\n### Globbing\n\nStarting from version 1.5, is possible to glob packages version and environment variables,\nas:\n\n    $ pytest --echo-version=pytest-* --echo-env=VIRTUAL*\n\nor\n\n    [pytest]\n    addopts = -vvv\n            --echo-env VIRTUAL*\n            --echo-version pytest-*\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytest-dev%2Fpytest-echo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpytest-dev%2Fpytest-echo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytest-dev%2Fpytest-echo/lists"}