Sidekick Python Library (sidekick-py)
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
-
Install the Python Library:
pip install sidekick-py
-
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+PorCmd+Shift+P) and runSidekick: Show Panel.
-
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)
| 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
|