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 a Pythonic API to interact with the Sidekick environment, enabling you to bring your code to life through interactive visualizations and user interfaces directly from Python scripts.

Quick Start

  1. Install the Python Library:

    pip install sidekick-py
    
  2. Install and Open in VS Code (Recommended for the best experience):

    • Install "Sidekick - Your Visual Coding Buddy" from the VS Code Marketplace.
    • Once installed, open the Sidekick Panel: Use the command palette (Ctrl+Shift+P or Cmd+Shift+P) and run Sidekick: Show Panel.
  3. Run the sample code:

    import sidekick
    import random
    
    # Create a 5x5 Grid
    grid = sidekick.Grid(5, 5)
    colors = ["khaki", "lavender", "peachpuff", "pink", "plum", "powderblue"]
    
    @grid.click # Use decorator for click handler
    def handle_cell_click(event):
        random_color = random.choice(colors)
        grid.set_color(event.x, event.y, random_color)
        print(f"Cell ({event.x}, {event.y}) set to {random_color}")
    
    # Keep your script running to listen for clicks!
    sidekick.run_forever()
    

    Run your Python script (e.g., python your_file.py) from your terminal, or use the "Run" button in VS Code.

    • If you have the VS Code extension installed and the Sidekick Panel open, you will see the 5x5 Grid appear directly in the panel.
    • If the VS Code extension is not active or not installed, the Python script will attempt to connect to a cloud relay server. In this case, a UI URL will be printed in your terminal; open this URL in your web browser to see and interact with the Grid.

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.7.tar.gz (103.8 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for sidekick_py-0.0.7.tar.gz
Algorithm Hash digest
SHA256 48edbbf2cab6ad3f03f1d67a3e78565eb72306b6990978aecbc0fffcded502a4
MD5 3337ba5423597f9ecb5d37891dcd2fcd
BLAKE2b-256 da78e472e081218a1ec5b299f43f3f6a6beb5732d4e9c60811d910520232a58f

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