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.3.tar.gz (138.1 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.3-py3-none-any.whl (79.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ic_basilisk_toolkit-0.1.3.tar.gz
  • Upload date:
  • Size: 138.1 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.3.tar.gz
Algorithm Hash digest
SHA256 9db6b7160a0715a0800d7f4aca347a4ae51ee06798cb001643942a1546397d06
MD5 1392275305e7a3f4e0f3651a89a6e8a0
BLAKE2b-256 29ce742edc668fce86827bdde8e7a0587124a215a96612e3919791a4e1c2da5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ic_basilisk_toolkit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 41447a46a4d266a474e772b3e2c55a9b3e018934149520d6cddfeb2c3a91cfa2
MD5 d2c159443f32374eea505f7ffd2c822f
BLAKE2b-256 c764d6f2795f48ce668c93860f472ab1db2eea629a4fea723d147ef3b516054b

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