Skip to main content

Client library for Sidekick Visual Coding Buddy

Project description

Sidekick Python Library (sidekick-py)

GitHub Repository PyPI version VS Code Marketplace License: MIT

This library provides the Python interface for interacting with the Sidekick Visual Coding Buddy frontend UI, typically running within VS Code. It allows your Python scripts to easily create, update, and interact with visual modules like grids (Grid), consoles (Console), variable visualizers (Viz), drawing canvases (Canvas), and UI controls (Control).

Quick Start

  1. Install the Python Library:

    pip install sidekick-py
    
  2. Install the VS Code Extension:

    Get "Sidekick - Your Visual Coding Buddy" from the VS Code Marketplace

  3. Open Sidekick Panel:

    Use the command palette (Ctrl+Shift+P) and run Sidekick: Show Panel.

  4. Run the sample code:

    import sidekick
    import random
    
    # Create a 5x5 Grid
    grid = sidekick.Grid(5, 5)
    
    # Define what happens on click
    def handle_click(x, y):
        colors = ["khaki", "lavender", "peachpuff", "pink", "plum", "powderblue"]
        random_color = random.choice(colors)
        grid.set_color(x, y, random_color)
    
    # Register the click handler
    grid.on_click(handle_click)
    
    # Keep your script running to listen for clicks!
    sidekick.run_forever()
    

    Run your script using python your_file.py in the terminal, or click the Run button in VS Code.

  5. Interact:

    Click cells in the Sidekick panel to see colors change (press Ctrl+C to stop)

Learn More

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sidekick_py-0.0.6.tar.gz (85.1 kB view details)

Uploaded Source

File details

Details for the file sidekick_py-0.0.6.tar.gz.

File metadata

  • Download URL: sidekick_py-0.0.6.tar.gz
  • Upload date:
  • Size: 85.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for sidekick_py-0.0.6.tar.gz
Algorithm Hash digest
SHA256 ff7bd0de0f8ae031036315d8469aca7bbc4ed06c6561817857fc5a8959a1a3a0
MD5 beb41d094483b18ad14af46454e116c3
BLAKE2b-256 707ef796bbafd01db6689adda54615061600d3276b21f5ac5756ca432ca52409

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page