A full-featured Python IDE for Android with LSP (Language Server Protocol) support for autocompletion, syntax highlighting, and more.
-
Code Editor
- Python syntax highlighting
- Line numbers
- Auto-indentation
- Cursor position tracking
-
LSP Autocompletion
- Local Python completor with keywords, builtins, and extracted symbols
- LSP client support for connecting to external Python language servers
- Context-aware completions
-
File Explorer
- Project tree view
- Create/delete/rename files and folders
- Quick file opening
-
Integrated Terminal
- Python code execution
- Command history
- Output coloring
-
Problems Panel
- Real-time error and warning detection
- Line/column navigation to issues
-
Multiple File Tabs
- Open multiple files simultaneously
- Dirty file indicators
- Quick tab switching and closing
- Flutter SDK 3.0.0 or higher
- Android SDK (for Android builds)
- Python 3 (for running Python code)
- Clone the repository:
git clone <repository-url>
cd python_ide- Install dependencies:
flutter pub get-
Connect an Android device or start an emulator
-
Build and run:
flutter runflutter build apk --releaseThe APK will be located at build/app/outputs/flutter-apk/app-release.apk
python_ide/
├── lib/
│ ├── main.dart # App entry point
│ ├── lsp/
│ │ ├── lsp_client.dart # LSP protocol client
│ │ └── python_completor.dart # Local Python completor
│ ├── models/
│ │ ├── editor_file.dart # Editor file model
│ │ ├── file_node.dart # File tree node model
│ │ ├── ide_state.dart # IDE state model
│ │ ├── lsp_types.dart # LSP type definitions
│ │ ├── models.dart # Barrel export
│ │ └── project.dart # Project model
│ ├── screens/
│ │ └── ide_screen.dart # Main IDE screen
│ ├── services/
│ │ ├── file_service.dart # File operations service
│ │ └── terminal_service.dart # Terminal execution service
│ ├── theme/
│ │ └── editor_theme.dart # Editor colors and syntax highlighting
│ └── widgets/
│ ├── code_editor.dart # Main code editor widget
│ ├── file_explorer.dart # File explorer widget
│ ├── problems_panel.dart # Problems panel widget
│ ├── status_bar.dart # Status bar widget
│ └── terminal_widget.dart # Terminal widget
├── android/ # Android platform files
└── pubspec.yaml # Flutter dependencies
The IDE includes:
-
Local Completor: Provides basic Python autocompletion using:
- Python keywords
- Built-in functions and classes
- Extracted imports, functions, classes, and variables from current file
-
LSP Client: Can connect to external LSP servers like:
pylsp(Python Language Server Protocol)pyrightjedi-language-server
To use an external LSP server, you would start the server and configure the connection in the LspClient.
- Create/Open Projects: Use the file explorer to manage projects
- Write Code: The editor provides syntax highlighting and autocompletion
- Run Code: Press the play button or use the terminal
- View Problems: Check the problems panel for errors and warnings
Ctrl+Space- Trigger autocompletionEnter/Tab- Accept completion suggestionEscape- Dismiss completion overlayArrow Up/Down- Navigate completion suggestions
The editor theme can be customized in lib/theme/editor_theme.dart. The current theme is based on VS Code's Dark+ theme.
This project is open source.