{"id":23439,"library":"codejail-includes","title":"codejail-includes","description":"A library providing safe includes for Python sandboxed execution via CodeJail. Version 2.0.0 supports Python >=3.11 and is maintained under the Open edX organization. It extracts and packages the includes previously embedded in edx-platform, allowing reuse in sandboxed code.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/openedx/codejail-includes","tags":["codejail","sandbox","openedx"],"install":[{"cmd":"pip install codejail-includes","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The package was renamed from 'codejail.includes' to 'codejail_includes' when extracted from edx-platform.","wrong":"from codejail.includes import safe_import_or_exec","symbol":"safe_import_or_exec","correct":"from codejail_includes import safe_import_or_exec"}],"quickstart":{"code":"from codejail_includes import safe_import_or_exec\n# Example: safely import a module\nresult = safe_import_or_exec('math', 'sqrt(16)')\nprint(result)  # Output: 4.0","lang":"python","description":"Demonstrates importing and executing a safe function using codejail-includes."},"warnings":[{"fix":"Update imports to 'from codejail_includes import ...'.","message":"Import path changed: use 'codejail_includes' not 'codejail.includes'.","severity":"breaking","affected_versions":"2.0.0"},{"fix":"Upgrade Python to >=3.11 or pin to an older version if available.","message":"Requires Python >=3.11; does not support older Python versions.","severity":"gotcha","affected_versions":"2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change import to 'from codejail_includes import safe_import_or_exec'.","cause":"Using the old import path from the original edx-platform package.","error":"ModuleNotFoundError: No module named 'codejail.includes'"},{"fix":"Run 'pip install codejail-includes' and verify the symbol exists in the module.","cause":"Missing package or incorrect symbol name; package may not be installed.","error":"ImportError: cannot import name 'safe_import_or_exec' from 'codejail_includes'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}