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

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

Built distributions (wheels)

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

Total release size: 264.3 MB

Release files / almanak-3.1.0.tar.gz

Download URL almanak-3.1.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
091fc059da5def906f6dd1fa5b190c571a412899f11595c6a8322ba2f0c72e2f
BLAKE2b-256 checksum
How to use checksums
c0480c10ab6ca7500c6b4f81db60357c4ca08f82435ad89b1999e7cca687b792
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.1.0-py3-none-win_amd64.whl

Download URL almanak-3.1.0-py3-none-win_amd64.whl
Size 58.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
cf39703f15712187619f94f9f02ee5367ccb58b324f45d084bdfa15adceb7a52
BLAKE2b-256 checksum
How to use checksums
f2bd87f36ec6428e724ba0a52dadae9794c47f80eb9332ec661ff3a668d1511e
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.1.0-py3-none-manylinux_2_17_x86_64.whl

Download URL almanak-3.1.0-py3-none-manylinux_2_17_x86_64.whl
Size 55.8 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3e53c9ff918f2c666d1bd8e0eb7646debcedf75dfc341dbc9c92e5ebc7f4b4f7
BLAKE2b-256 checksum
How to use checksums
5cb3a501ef44cf20c7bf6c91ef49d91e11fd42fd4edf48eac56824b8589137c1
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.1.0-py3-none-manylinux_2_17_aarch64.whl

Download URL almanak-3.1.0-py3-none-manylinux_2_17_aarch64.whl
Size 55.7 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
05634cb991663f1405c6888b8ef8a8c2b370627083e410b1e368465a2fbb26ed
BLAKE2b-256 checksum
How to use checksums
753fff2c513dfdf887aeb14166668f8bcfd05ec9aa117a5b17fd62f1ea8bfdd9
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.1.0-py3-none-macosx_11_0_x86_64.whl

Download URL almanak-3.1.0-py3-none-macosx_11_0_x86_64.whl
Size 47.5 MB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
46b0f040b6d250d76c48a4e754fe6b62c7f94cfba92afcb9dc6af6f50d3509ae
BLAKE2b-256 checksum
How to use checksums
ecabe5e2b62927f6ed91d753c148503ac6c2e54b252c4f34be5b5a0577c4714d
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.1.0-py3-none-macosx_11_0_arm64.whl

Download URL almanak-3.1.0-py3-none-macosx_11_0_arm64.whl
Size 44.9 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
346358532442a8ef29bd96cab8f8b50bf9114a8aebd6729567837c1a18fd895c
BLAKE2b-256 checksum
How to use checksums
787057fbefc5b581d670a45145b4d3b8014d0dbc9e8487b00172b7da9983a484
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.1.0

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