{"id":21174,"library":"dlint","title":"Dlint","description":"Dlint is a security-focused linter for Python that enforces best coding practices and helps prevent common vulnerabilities. The latest version is 0.16.0, compatible with Python 3.8.1 to 3.11. It is actively maintained with ongoing releases.","status":"active","version":"0.16.0","language":"python","source_language":"en","source_url":"https://github.com/dlint-py/dlint","tags":["linter","security","static analysis","flake8 plugin"],"install":[{"cmd":"pip install dlint","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Dlint integrates with flake8; some users may need flake8 for proper use.","package":"flake8","optional":true}],"imports":[{"note":"The function is named lint_run, not run.","wrong":"from dlint import run","symbol":"lint_run","correct":"from dlint import lint_run"},{"note":"get_plugins is a top-level module function, not under dlint.plugins.","wrong":"from dlint.plugins import get_plugins","symbol":"get_plugins","correct":"from dlint import get_plugins"}],"quickstart":{"code":"from dlint import lint_run\nimport os\ncode = \"import os; os.system('ls')\"\nresult = lint_run(code, plugins=None, ignore=[], allowed_codes=[])\nfor issue in result:\n    print(issue.linter_code, issue.message)","lang":"python","description":"Run Dlint on a string of Python code and print out any security issues found."},"warnings":[{"fix":"Run 'flake8 --select=DUO' instead of 'dlint'.","message":"Dlint 0.14.0 removed the 'dlint' CLI command; use flake8 with dlint plugin instead.","severity":"breaking","affected_versions":">=0.14.0"},{"fix":"Specify 'allowed_codes' instead of 'plugins'.","message":"The 'plugins' argument to lint_run is deprecated; use 'allowed_codes' instead.","severity":"deprecated","affected_versions":">=0.12.0"},{"fix":"Restart your editor or re-run flake8 after pip install dlint.","message":"Dlint codes (e.g., DUO123) are not dynamically loaded; you must restart your linter after installing dlint.","severity":"gotcha","affected_versions":"all"},{"fix":"pip install dlint && flake8 --select=DUO your_code.py","message":"If using flake8, ensure you have the 'dlint' package installed and use '--select=DUO' to enable Dlint rules.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure Dlint is installed: pip install dlint. Check that you're using the correct Python interpreter (e.g., virtualenv).","cause":"Dlint is not installed or installed in a different Python environment.","error":"ModuleNotFoundError: No module named 'dlint'"},{"fix":"Install dlint: pip install dlint. Then run flake8 --select=DUO. If still failing, check flake8 plugin installation paths.","cause":"Dlint is not installed or not properly configured as a flake8 plugin.","error":"flake8: error: unrecognized arguments: --select=DUO"},{"fix":"Upgrade to latest dlint: pip install --upgrade dlint. Or use the old API: from dlint import run (if version <0.12.0).","cause":"Using an older version of dlint (<0.12.0) where lint_run was not the public API.","error":"AttributeError: module 'dlint' has no attribute 'lint_run'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}