Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

G-Code-IA/python-ide

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python IDE for Android

A full-featured Python IDE for Android with LSP (Language Server Protocol) support for autocompletion, syntax highlighting, and more.

Features

  • 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

Requirements

  • Flutter SDK 3.0.0 or higher
  • Android SDK (for Android builds)
  • Python 3 (for running Python code)

Installation

  1. Clone the repository:
git clone <repository-url>
cd python_ide
  1. Install dependencies:
flutter pub get
  1. Connect an Android device or start an emulator

  2. Build and run:

flutter run

Building APK

flutter build apk --release

The APK will be located at build/app/outputs/flutter-apk/app-release.apk

Project Structure

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

LSP Integration

The IDE includes:

  1. Local Completor: Provides basic Python autocompletion using:

    • Python keywords
    • Built-in functions and classes
    • Extracted imports, functions, classes, and variables from current file
  2. LSP Client: Can connect to external LSP servers like:

    • pylsp (Python Language Server Protocol)
    • pyright
    • jedi-language-server

To use an external LSP server, you would start the server and configure the connection in the LspClient.

Usage

  1. Create/Open Projects: Use the file explorer to manage projects
  2. Write Code: The editor provides syntax highlighting and autocompletion
  3. Run Code: Press the play button or use the terminal
  4. View Problems: Check the problems panel for errors and warnings

Keyboard Shortcuts

  • Ctrl+Space - Trigger autocompletion
  • Enter/Tab - Accept completion suggestion
  • Escape - Dismiss completion overlay
  • Arrow Up/Down - Navigate completion suggestions

Customization

The editor theme can be customized in lib/theme/editor_theme.dart. The current theme is based on VS Code's Dark+ theme.

License

This project is open source.

About

A full-featured Python IDE for Android with LSP support for autocompletion, syntax highlighting, and more.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.