Skip to main content

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 ManagementTask, 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

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

ic_basilisk_toolkit-0.1.1.tar.gz (137.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ic_basilisk_toolkit-0.1.1-py3-none-any.whl (79.0 kB view details)

Uploaded Python 3

File details

Details for the file ic_basilisk_toolkit-0.1.1.tar.gz.

File metadata

  • Download URL: ic_basilisk_toolkit-0.1.1.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

Hashes for ic_basilisk_toolkit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d7accfd839724d5bb73b0f156a9de9e38e807e5d9175def46eb2e22579da9904
MD5 065360b2d283c89fdb262e76646328cb
BLAKE2b-256 fb8f61a1e2127fa18e098b28bb1ff0cbbfa89f94535d22e3085c3301c331d0a9

See more details on using hashes here.

File details

Details for the file ic_basilisk_toolkit-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ic_basilisk_toolkit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2a0f7abf09dbb6abcc7ec501b675b21eb13e56a3005037e5f49df4775c43dd9
MD5 cf332125adb2851174f769e86ebcac3f
BLAKE2b-256 9b03f4ebbd1494451af7acdac2fa1afce24ca1b118e113bc6b9e1582b488244c

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