Skip to main content

Quick Start

Ape Trezor is a plugin for Ape Framework which integrates Trezorlib ethereum.py to load and create accounts, sign messages, and sign transactions.

Dependencies

  • Python 3 version 3.10 or greater.
  • Supported Trezor device (x = tested):
    • Model T
    • Safe 3
    • Safe 5
    • Safe 7

Note: USB does not work in WSL2 environments natively and requires additional setup.

Installation

via pip

You can install the latest release via pip:

pip install ape-trezor

via source

You can clone the repository and install for development:

git clone https://github.com/ApeWorX/ape-trezor.git
cd ape-trezor
uv sync --group dev
uv run prek install

Quick Usage

Trezor accounts have the following capabilities in ape:

  1. Can sign transactions (both static-fee and EIP-1559 compliant)
  2. Can sign messages using the default EIP-191 specification

To use the Trezor plugin, you must have the Trezor USB device connected and unlocked.

WARNING: When the Trezor Suite is open, you may face additional connection issues. It is recommended to not have the Trezor Suite application open while using the plugin.

Add Accounts

Add accounts using the add command:

ape trezor add <alias>

You can also specify the HD Path:

ape trezor add <alias> --hd-path "m/44'/1'/0'/0"

WARNING: When using 3rd party wallets, such as this plugin, trezorlib discourages signing transactions from the default Ethereum HD Path m/44'/60'/0'/0. Changing the HD-Path in that circumstance will allow fewer warnings from both Ape and the device, as well as improved security. See https://github.com/trezor/trezor-firmware/issues/1336#issuecomment-720126545 for more information.

trezor:
  hd_path: "m/44'/1'/0'/0"

List Accounts

To list just your Trezor accounts in ape, do:

ape trezor list

Remove accounts

You can also remove accounts:

ape trezor delete <alias>
ape trezor delete-all

Sign Messages

You can sign messages with your accounts:

ape trezor sign-message <alias> "hello world"

Verify Messages

You can also verify a message with a signature:

ape trezor verify-message "hello world" <signature>

Using trezorctl

For conveinence, we've added trezorctl from the trezor library as a subcommand under this plugin's own ape trezor cli subcommand. To access it, simply use ape trezor ctl [CMD].

As an example, to connect to the new BLE-enabled Trezor 7 device, use:

$ ape trezor ctl ble connect

You can also use other commands for deeper management of the device such as:

# Setup a new device
$ ape trezor ctl device setup

# Manage firmware on device(s)
$ ape trezor ctl firmware

Development

Please see the contributing guide to learn more how to contribute to this project. Comments, questions, criticisms and pull requests are welcomed.

Metadata

Release files for ape-trezor 0.8.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ape-trezor 0.8.5
File Size Uploaded Provenance Actions
ape_trezor-0.8.5.tar.gz 27.6 kB With provenance Details for ape_trezor-0.8.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ape-trezor 0.8.5
File Interpreter ABI Platform Actions
ape_trezor-0.8.5-py3-none-any.whl Python 3 none any Details for ape_trezor-0.8.5-py3-none-any.whl

Total release size: 44.8 kB

Release files / ape_trezor-0.8.5.tar.gz

Download URL ape_trezor-0.8.5.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6cfb932d1f4e1a25a9bbbdffd0b2892c09d9bb032512d33f5b2bf9cd4c5cc3f6
BLAKE2b-256 checksum
How to use checksums
4b614321128eaf893fc0a285365e90afa36ede78c7187cca0d35f4de4a91e56a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / ape_trezor-0.8.5-py3-none-any.whl

Download URL ape_trezor-0.8.5-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3de1ce92cb5b9c1fd634d6a97a979bd5e9548749490e338256220ebf1663a11
BLAKE2b-256 checksum
How to use checksums
746eb3b0abb8b1ab5bb41e0477214853e668b8bdb81d4311137d2ea2a704c498
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for ape-trezor 0.8.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ape_trezor-0.8.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page