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.3.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.3.1
File Size Uploaded Provenance Actions
almanak-3.3.1.tar.gz 1.9 MB Without provenance Details for almanak-3.3.1.tar.gz

Built distributions (wheels)

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

Total release size: 266.9 MB

Release files / almanak-3.3.1.tar.gz

Download URL almanak-3.3.1.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
051c75003f8ffa27a87a24e27e2abcefd7f50e37789e2421819237532d42ea89
BLAKE2b-256 checksum
How to use checksums
3417ff481ddea53a1919f7d37d58c01bf683f5d8ca4f37929e86a7c486607654
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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.3.1-py3-none-win_amd64.whl

Download URL almanak-3.3.1-py3-none-win_amd64.whl
Size 59.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
661c98b1acf868637b936a8a6b10a3f7783b3f2dc916e07fc66e076bce9b3b88
BLAKE2b-256 checksum
How to use checksums
0983855711c5e4851a68ef23cf8c0a839b7c21718c944a00d2edc9f7e1470127
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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.3.1-py3-none-manylinux_2_17_x86_64.whl

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

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

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

Download URL almanak-3.3.1-py3-none-macosx_11_0_arm64.whl
Size 45.4 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
78960fbae31f50a1283ec937400b567578620e8af3d048e5560d205285ee9640
BLAKE2b-256 checksum
How to use checksums
3004ce87fb1dae10e383e25f22f6f064be07b797f8c08bc27f49c6c1f0d6d71a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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.3.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.3.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