├── .env.example ├── .flake8 ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── pull_request_template.md └── workflows │ ├── publish.yml │ └── test.yml ├── .gitignore ├── .mypy.ini ├── .python-version ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── MANIFEST.in ├── README.md ├── SECURITY.md ├── constraints.md ├── cursor_agent_tools ├── __init__.py ├── agent │ ├── __init__.py │ └── tools │ │ ├── __init__.py │ │ ├── file_tools.py │ │ ├── register_tools.py │ │ ├── search_tools.py │ │ └── system_tools.py ├── base.py ├── claude_agent.py ├── factory.py ├── interact.py ├── logger.py ├── ollama_agent.py ├── openai_agent.py ├── permissions.py └── tools │ ├── __init__.py │ ├── file_tools.py │ ├── image_tools.py │ ├── register_tools.py │ ├── search_tools.py │ └── system_tools.py ├── debug_ollama.py ├── dev_install.sh ├── divide_function.py ├── docs ├── ollama_integration.md ├── open_source_models.md ├── permissions_guide.md ├── trend_search.md └── web_search.md ├── examples ├── README.md ├── basic_usage.py ├── chat_conversation_example.py ├── code_search_example.py ├── demo_files │ ├── interactive_demo │ │ ├── app │ │ │ ├── main.py │ │ │ └── todo_model.py │ │ └── requirements.txt │ └── test_calculator.py ├── demo_project │ ├── README.md │ ├── config.yaml │ ├── database.py │ ├── main.py │ ├── models │ │ └── user.py │ └── utils │ │ ├── config.py │ │ └── logger.py ├── file_manipulation_example.py ├── interactive_mode_example.py ├── line_based_edit_example.py ├── main.py ├── ollama_chat_example.py ├── ollama_image_query_example.py ├── ollama_tool_calling_example.py ├── permission_example.py ├── simple_task_example.py ├── trend_search_example.py ├── utils.py └── web_search_example.py ├── factorial.py ├── fix_whitespace_errors.py ├── install_test_package.sh ├── pyproject.toml ├── pytest.ini ├── reinstall.sh ├── requirements.txt ├── run_ci_checks.sh ├── setup.cfg ├── setup.py ├── test_backward_compatibility.py ├── test_imports.py └── tests ├── __init__.py ├── conftest.py ├── create_test_dirs.py ├── test_anthropic_direct.py ├── test_anthropic_key.py ├── test_basic.py ├── test_claude_agent.py ├── test_claude_chat.py ├── test_image_integration.py ├── test_image_tools.py ├── test_ollama_agent.py ├── test_openai_agent.py ├── test_permissions.py ├── test_tools.py ├── test_trend_search.py └── utils.py /.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/.env.example -------------------------------------------------------------------------------- /.flake8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/.flake8 -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/.github/FUNDING.yml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/.github/ISSUE_TEMPLATE/bug_report.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/.github/ISSUE_TEMPLATE/feature_request.md -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/.github/pull_request_template.md -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/.github/workflows/publish.yml -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/.github/workflows/test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/.gitignore -------------------------------------------------------------------------------- /.mypy.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/.mypy.ini -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.11-dev 2 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/CODEOWNERS -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/LICENSE -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/MANIFEST.in -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/README.md -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/SECURITY.md -------------------------------------------------------------------------------- /constraints.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/constraints.md -------------------------------------------------------------------------------- /cursor_agent_tools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/__init__.py -------------------------------------------------------------------------------- /cursor_agent_tools/agent/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/agent/__init__.py -------------------------------------------------------------------------------- /cursor_agent_tools/agent/tools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/agent/tools/__init__.py -------------------------------------------------------------------------------- /cursor_agent_tools/agent/tools/file_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/agent/tools/file_tools.py -------------------------------------------------------------------------------- /cursor_agent_tools/agent/tools/register_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/agent/tools/register_tools.py -------------------------------------------------------------------------------- /cursor_agent_tools/agent/tools/search_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/agent/tools/search_tools.py -------------------------------------------------------------------------------- /cursor_agent_tools/agent/tools/system_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/agent/tools/system_tools.py -------------------------------------------------------------------------------- /cursor_agent_tools/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/base.py -------------------------------------------------------------------------------- /cursor_agent_tools/claude_agent.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/claude_agent.py -------------------------------------------------------------------------------- /cursor_agent_tools/factory.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/factory.py -------------------------------------------------------------------------------- /cursor_agent_tools/interact.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/interact.py -------------------------------------------------------------------------------- /cursor_agent_tools/logger.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/logger.py -------------------------------------------------------------------------------- /cursor_agent_tools/ollama_agent.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/ollama_agent.py -------------------------------------------------------------------------------- /cursor_agent_tools/openai_agent.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/openai_agent.py -------------------------------------------------------------------------------- /cursor_agent_tools/permissions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/permissions.py -------------------------------------------------------------------------------- /cursor_agent_tools/tools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/tools/__init__.py -------------------------------------------------------------------------------- /cursor_agent_tools/tools/file_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/tools/file_tools.py -------------------------------------------------------------------------------- /cursor_agent_tools/tools/image_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/tools/image_tools.py -------------------------------------------------------------------------------- /cursor_agent_tools/tools/register_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/tools/register_tools.py -------------------------------------------------------------------------------- /cursor_agent_tools/tools/search_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/tools/search_tools.py -------------------------------------------------------------------------------- /cursor_agent_tools/tools/system_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/cursor_agent_tools/tools/system_tools.py -------------------------------------------------------------------------------- /debug_ollama.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/debug_ollama.py -------------------------------------------------------------------------------- /dev_install.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/dev_install.sh -------------------------------------------------------------------------------- /divide_function.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/divide_function.py -------------------------------------------------------------------------------- /docs/ollama_integration.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/docs/ollama_integration.md -------------------------------------------------------------------------------- /docs/open_source_models.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/docs/open_source_models.md -------------------------------------------------------------------------------- /docs/permissions_guide.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/docs/permissions_guide.md -------------------------------------------------------------------------------- /docs/trend_search.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/docs/trend_search.md -------------------------------------------------------------------------------- /docs/web_search.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/docs/web_search.md -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/README.md -------------------------------------------------------------------------------- /examples/basic_usage.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/basic_usage.py -------------------------------------------------------------------------------- /examples/chat_conversation_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/chat_conversation_example.py -------------------------------------------------------------------------------- /examples/code_search_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/code_search_example.py -------------------------------------------------------------------------------- /examples/demo_files/interactive_demo/app/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/demo_files/interactive_demo/app/main.py -------------------------------------------------------------------------------- /examples/demo_files/interactive_demo/app/todo_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/demo_files/interactive_demo/app/todo_model.py -------------------------------------------------------------------------------- /examples/demo_files/interactive_demo/requirements.txt: -------------------------------------------------------------------------------- 1 | fastapi 2 | uvicorn -------------------------------------------------------------------------------- /examples/demo_files/test_calculator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/demo_files/test_calculator.py -------------------------------------------------------------------------------- /examples/demo_project/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/demo_project/README.md -------------------------------------------------------------------------------- /examples/demo_project/config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/demo_project/config.yaml -------------------------------------------------------------------------------- /examples/demo_project/database.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/demo_project/database.py -------------------------------------------------------------------------------- /examples/demo_project/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/demo_project/main.py -------------------------------------------------------------------------------- /examples/demo_project/models/user.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/demo_project/models/user.py -------------------------------------------------------------------------------- /examples/demo_project/utils/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/demo_project/utils/config.py -------------------------------------------------------------------------------- /examples/demo_project/utils/logger.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/demo_project/utils/logger.py -------------------------------------------------------------------------------- /examples/file_manipulation_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/file_manipulation_example.py -------------------------------------------------------------------------------- /examples/interactive_mode_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/interactive_mode_example.py -------------------------------------------------------------------------------- /examples/line_based_edit_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/line_based_edit_example.py -------------------------------------------------------------------------------- /examples/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/main.py -------------------------------------------------------------------------------- /examples/ollama_chat_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/ollama_chat_example.py -------------------------------------------------------------------------------- /examples/ollama_image_query_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/ollama_image_query_example.py -------------------------------------------------------------------------------- /examples/ollama_tool_calling_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/ollama_tool_calling_example.py -------------------------------------------------------------------------------- /examples/permission_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/permission_example.py -------------------------------------------------------------------------------- /examples/simple_task_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/simple_task_example.py -------------------------------------------------------------------------------- /examples/trend_search_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/trend_search_example.py -------------------------------------------------------------------------------- /examples/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/utils.py -------------------------------------------------------------------------------- /examples/web_search_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/examples/web_search_example.py -------------------------------------------------------------------------------- /factorial.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/factorial.py -------------------------------------------------------------------------------- /fix_whitespace_errors.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/fix_whitespace_errors.py -------------------------------------------------------------------------------- /install_test_package.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/install_test_package.sh -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/pyproject.toml -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/pytest.ini -------------------------------------------------------------------------------- /reinstall.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/reinstall.sh -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/requirements.txt -------------------------------------------------------------------------------- /run_ci_checks.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/run_ci_checks.sh -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/setup.cfg -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/setup.py -------------------------------------------------------------------------------- /test_backward_compatibility.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/test_backward_compatibility.py -------------------------------------------------------------------------------- /test_imports.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/test_imports.py -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/__init__.py -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/conftest.py -------------------------------------------------------------------------------- /tests/create_test_dirs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/create_test_dirs.py -------------------------------------------------------------------------------- /tests/test_anthropic_direct.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/test_anthropic_direct.py -------------------------------------------------------------------------------- /tests/test_anthropic_key.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/test_anthropic_key.py -------------------------------------------------------------------------------- /tests/test_basic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/test_basic.py -------------------------------------------------------------------------------- /tests/test_claude_agent.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/test_claude_agent.py -------------------------------------------------------------------------------- /tests/test_claude_chat.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/test_claude_chat.py -------------------------------------------------------------------------------- /tests/test_image_integration.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/test_image_integration.py -------------------------------------------------------------------------------- /tests/test_image_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/test_image_tools.py -------------------------------------------------------------------------------- /tests/test_ollama_agent.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/test_ollama_agent.py -------------------------------------------------------------------------------- /tests/test_openai_agent.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/test_openai_agent.py -------------------------------------------------------------------------------- /tests/test_permissions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/test_permissions.py -------------------------------------------------------------------------------- /tests/test_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/test_tools.py -------------------------------------------------------------------------------- /tests/test_trend_search.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/test_trend_search.py -------------------------------------------------------------------------------- /tests/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/civai-technologies/cursor-agent/HEAD/tests/utils.py --------------------------------------------------------------------------------