Basilisk Toolkit — Services, shell, and SFTP for IC Python canisters
Project description
ic-basilisk-toolkit
Basilisk Toolkit — Services, interactive shell, and SFTP for Basilisk IC Python canisters.
Overview
ic-basilisk-toolkit provides ready-made services on top of the Basilisk CDK:
- Task/Process Management —
Task,TaskStep,TaskSchedule,TaskManager - Wallet — ICRC-1 token registry, transfers, balance tracking, transaction sync
- Encryption — vetKeys + per-principal envelopes + groups (
CryptoService) - FX — Exchange rate queries via the IC XRC canister (
FXService) - Entities — Persistent ORM entities via ic-python-db
- Logging — Structured logging via ic-python-logging
- Interactive Shell — REPL for live canister interaction (
basilisk-toolkit shell) - SFTP — Browse and edit canister filesystem over SSH (
basilisk-toolkit sshd)
Installation
pip install ic-basilisk-toolkit
For shell/SFTP support (requires asyncssh):
pip install ic-basilisk-toolkit[shell]
CLI Usage
basilisk-toolkit exec 'print("hello")' # Execute code on canister
basilisk-toolkit shell --canister my_app --network ic # Interactive shell
basilisk-toolkit sshd --canister my_app --network ic # SSH/SFTP server
Canister-Side Usage
Inside your canister code:
from ic_basilisk_toolkit import Task, TaskStep, Wallet, CryptoService
# Create and schedule a task
task = Task(name="sync_balances")
TaskStep(task=task, name="fetch", code="wallet.refresh_all()")
Dependencies
- ic-basilisk — CDK (types, decorators,
ic.*API) - ic-python-db — Persistent entity ORM
- ic-python-logging — Structured logging
Development
git clone https://github.com/smart-social-contracts/ic-basilisk-toolkit.git
cd ic-basilisk-toolkit
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
pytest tests/ -v
License
MIT — see LICENSE.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ic_basilisk_toolkit-0.1.2.tar.gz.
File metadata
- Download URL: ic_basilisk_toolkit-0.1.2.tar.gz
- Upload date:
- Size: 137.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
482fb843248b4e69affecd92cbc408e10255246a511d5113c08d1c3a7319ae80
|
|
| MD5 |
2000f1d546f457f3746335f5e91f0e42
|
|
| BLAKE2b-256 |
ecef8d54bfd7f22f895c0029f35d3ac7071e0d24633c670faaf22a80f5ba9390
|
File details
Details for the file ic_basilisk_toolkit-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ic_basilisk_toolkit-0.1.2-py3-none-any.whl
- Upload date:
- Size: 79.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f597cb9121881f918a745b34b8caea7b52b65f5edca61ed9b0c6ed8526c332e
|
|
| MD5 |
143c16e03a998d1954f2a3280de58377
|
|
| BLAKE2b-256 |
80e0b54b8128257a873280a803e5bbbb735ddb4c2f92e3a9667bd043ad71473f
|