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 sdk.docs.almanak.co.

Metadata

Release files for almanak 3.1.1

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.1.1
File Size Uploaded Provenance Actions
almanak-3.1.1.tar.gz 1.7 MB Without provenance Details for almanak-3.1.1.tar.gz

Built distributions (wheels)

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

Total release size: 265.1 MB

Release files / almanak-3.1.1.tar.gz

Download URL almanak-3.1.1.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
b2322a0d3ce723d905eb03109eb15d825d6d9ba4892e0df474255655dc7e29e9
BLAKE2b-256 checksum
How to use checksums
5cd6b6c994e2e76e940f3e3b67d7f234d22ce0bc7d3d706746a9e1ddf48e7e9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.1.1-py3-none-win_amd64.whl

Download URL almanak-3.1.1-py3-none-win_amd64.whl
Size 58.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
af458261465d8e4bcb588284eed015091e0b7a13730b12466a787460454e209b
BLAKE2b-256 checksum
How to use checksums
cae73ab457648476ed0b05e46bf9633e70b18fb51837ca0e624fb8b9eb4109cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.1.1-py3-none-manylinux_2_17_x86_64.whl

Download URL almanak-3.1.1-py3-none-manylinux_2_17_x86_64.whl
Size 56.0 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6875e6e5a52a654b399cea4b378632dea21ec55fcd6d9370430b0ba37e7b696c
BLAKE2b-256 checksum
How to use checksums
4ec82ac7821ebd729b9f45c1303f1d505a33261e5a86056604327639003c084a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.1.1-py3-none-manylinux_2_17_aarch64.whl

Download URL almanak-3.1.1-py3-none-manylinux_2_17_aarch64.whl
Size 55.8 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
fd130f345f49c87edcd0508a20b4b4ac68c8dc56509f952eeb443ffaf3c9d187
BLAKE2b-256 checksum
How to use checksums
1dd407920ed41fb11cabb7d85d8a343a4df4c5c51b21b00e3f036fb171e63b37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.1.1-py3-none-macosx_11_0_x86_64.whl

Download URL almanak-3.1.1-py3-none-macosx_11_0_x86_64.whl
Size 47.6 MB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
cc526ab1fb840d2b0912cccf5d51d57b2fd367f7fb5e20c03a37ce7a40776661
BLAKE2b-256 checksum
How to use checksums
c24e5817bd39fe429516e4523fc0502c0186cb53ad73b4e6fc0dd070550a45b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.1.1-py3-none-macosx_11_0_arm64.whl

Download URL almanak-3.1.1-py3-none-macosx_11_0_arm64.whl
Size 45.1 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0e347b9c5ce03389eaa4d443144dda7e249014c713a33fd1b56c0a8fe13bdadf
BLAKE2b-256 checksum
How to use checksums
ba5a32c3c7a864651296c5f629b64dba9f1d8668e603805914fb5c09863d669b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.1.1

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.1.1 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