Skip to main content

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

Metadata

Release files for sidekick-py 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sidekick-py 0.0.7
File Size Uploaded
sidekick_py-0.0.7.tar.gz 103.8 kB Details

Release files / sidekick_py-0.0.7.tar.gz

Download URL sidekick_py-0.0.7.tar.gz
Size 103.8 kB
Tags Source
SHA-256 checksum
How to use checksums
48edbbf2cab6ad3f03f1d67a3e78565eb72306b6990978aecbc0fffcded502a4
BLAKE2b-256 checksum
How to use checksums
da78e472e081218a1ec5b299f43f3f6a6beb5732d4e9c60811d910520232a58f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.0.7 This release

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page