Seahorse allows developers to write Solana programs in Python. Under the hood, Seahorse parses Python AST and transpiles it into standard Anchor-compatible Rust code.
python
# Seahorse Python example
from seahorse.prelude import *
declare_id('Fg6P...sLnS')
class Calculator(Account):
owner: Pubkey
result: u64
@instruction
def init_calculator(owner: Signer, calc: Empty[Calculator]):
calculator = calc.init(payer = owner, seeds = ['calculator', owner])
calculator.owner = owner.key()
calculator.result = 0