Skip to main content

Almanak SDK

Almanak is a Python SDK for writing, checking, backtesting and operating autonomous DeFi strategies. A strategy consists of two author-maintained files: strategy.py, which makes decisions, and config.yaml, which states the economic choices the strategy may use.

The same strategy definition runs in historical evaluation, identified forks and supported production environments. The SDK keeps network access, secrets, signing, durable execution and protocol mechanics outside strategy code.

Version 3.0.0 is the first release of the rewritten SDK. Projects built on the 2.x line should pin almanak<3.

Installation

Requires Python 3.12+.

uv add almanak            # as a project dependency
uv tool install almanak   # the command-line tool only

Optional extras:

Extra Enables
ta Technical analysis over declared strategy price series (numpy, TA-Lib)
code Python LSP for the bundled Almanak Code agent (pyright)

Local strategy hook execution is verified on Linux and requires Bubblewrap (sudo apt-get install bubblewrap libseccomp2 on Debian or Ubuntu). Fork runs also require Foundry's anvil.

Usage

almanak check path/to/strategy
almanak backtest run path/to/strategy --backtest-config backtest.yaml \
  --gateway-config operator.yaml --env-file .env --output runs/test
almanak run path/to/strategy --fork --gateway-config operator.fork.yaml \
  --env-file .env --output runs/demo

almanak support lists the connectors, chains, actions and run modes that admission accepts.

Documentation

Guides, the CLI reference and the strategy API are at docs.almanak.co.

Metadata

Release files for almanak 3.4.2

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

Source distribution (sdist)

Source distribution for almanak 3.4.2
File Size Uploaded Provenance Actions
almanak-3.4.2.tar.gz 2.1 MB Without provenance Details for almanak-3.4.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for almanak 3.4.2
File Actions
almanak-3.4.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for almanak-3.4.2-py3-none-win_amd64.whl
almanak-3.4.2-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for almanak-3.4.2-py3-none-manylinux_2_17_x86_64.whl
almanak-3.4.2-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for almanak-3.4.2-py3-none-manylinux_2_17_aarch64.whl
almanak-3.4.2-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details for almanak-3.4.2-py3-none-macosx_11_0_x86_64.whl
almanak-3.4.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for almanak-3.4.2-py3-none-macosx_11_0_arm64.whl

Total release size: 267.8 MB

Release files / almanak-3.4.2.tar.gz

Download URL almanak-3.4.2.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
e7cb8a0b69d5eb958dcdb9e46da8c06314e0da213455cf34c9790d8c070382ca
BLAKE2b-256 checksum
How to use checksums
a53344684e20358de987c513ed3b065ffb322c3dd5b1165b162424172c09048d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / almanak-3.4.2-py3-none-win_amd64.whl

Download URL almanak-3.4.2-py3-none-win_amd64.whl
Size 59.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
03bb3d427d76f37307d3530367abf3f9e153248634533fd07e8a48d662212fbf
BLAKE2b-256 checksum
How to use checksums
f6bd013c6d24a467f3ef6bfee46ae3cd60846a628c2370e891c1537a3fc1ba3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / almanak-3.4.2-py3-none-manylinux_2_17_x86_64.whl

Download URL almanak-3.4.2-py3-none-manylinux_2_17_x86_64.whl
Size 56.4 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3f5afd87f0d4bcd4db64568962fc92e5c8421c2f2a92ee7b2549aaa999089d2b
BLAKE2b-256 checksum
How to use checksums
f925c9032e514f0389481433a956f7272e89450812836b8415e8d4a697e239e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / almanak-3.4.2-py3-none-manylinux_2_17_aarch64.whl

Download URL almanak-3.4.2-py3-none-manylinux_2_17_aarch64.whl
Size 56.3 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
f83162f46d70f7f37f2f219887c5c5c7c57fbd5630db4e6f82bfebb6ffe1d07b
BLAKE2b-256 checksum
How to use checksums
5cd6219b074b1232738c395e34a7c5f47f0994c9b2720d328c14db842f1f7a71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / almanak-3.4.2-py3-none-macosx_11_0_x86_64.whl

Download URL almanak-3.4.2-py3-none-macosx_11_0_x86_64.whl
Size 48.1 MB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
9dec58a1ec13a2092a10297d82232299a55591726dc081e75c5f763d726ddc9e
BLAKE2b-256 checksum
How to use checksums
f8920c162b438e92e572cb8b67580f4a975e1d352a93adead975382e48d00cb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / almanak-3.4.2-py3-none-macosx_11_0_arm64.whl

Download URL almanak-3.4.2-py3-none-macosx_11_0_arm64.whl
Size 45.5 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d70ea99afe09be56747e814215cd9e4293cfb553e0e35766fdad35065cbd251b
BLAKE2b-256 checksum
How to use checksums
1201997bcf69dd8b765c82db408cc79775e41a1de8222ca1a09ea3f0ddf6af79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for almanak 3.4.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

3.4.2 This release

6 release files No provenance

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