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.0.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.0.1
File Size Uploaded Provenance Actions
almanak-3.0.1.tar.gz 1.5 MB Without provenance Details for almanak-3.0.1.tar.gz

Built distributions (wheels)

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

Total release size: 215.8 MB

Release files / almanak-3.0.1.tar.gz

Download URL almanak-3.0.1.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
77909b3c4a09886edb07d34850679f3d51271bc4112754a9a777bdff9d49671c
BLAKE2b-256 checksum
How to use checksums
561a96a9f109d953cb97965ded7f013e1c4d1b6572d279ccdb2bb4082c97fe69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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.0.1-py3-none-win_amd64.whl

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

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

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

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

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