Skip to main content

Basilisk OS — Operating system services, shell, and SFTP for IC Python canisters

Project description

ic-basilisk-toolkit

Basilisk OS — Operating system services, interactive shell, and SFTP for Basilisk IC Python canisters.

Overview

ic-basilisk-toolkit provides POSIX-like abstractions 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.0.tar.gz (136.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.0-py3-none-any.whl (78.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ic_basilisk_toolkit-0.1.0.tar.gz
  • Upload date:
  • Size: 136.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.0.tar.gz
Algorithm Hash digest
SHA256 9ceb38b6f0c602fdd76cde99d63dcf47c5c20e692ec0346ec2ee5b711d99cf8a
MD5 3eba8a6d85f28f7b587469d72dafbda7
BLAKE2b-256 20f10bd8411d0c75f3834d00bfe7178ed582132a83ec790dd1d0d9e9498cf04e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ic_basilisk_toolkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7abc13bf1f6f4e96f6ac73245a46f07176a74bcc8a9617d9dc51f32b0ca9b389
MD5 589637a6257091c3ce9781919d0fc699
BLAKE2b-256 86ceba297d902866013085481657e22a405fa8c2ef9cf4ed9d5b25e535e35a9f

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