Skip to main content

fakenode

A simulated Autonomi node for testing node management software.

What is fakenode?

fakenode provides a lightweight simulator that mimics the HTTP endpoints of an Autonomi node. It's designed for testing node management tools without running actual nodes, making development and testing faster and easier.

Features

  • Simulates /metadata and /metrics endpoints with realistic OpenMetrics format responses
  • Configurable node version, peer ID, and performance metrics
  • Creates node environment files (PID, peer-id, logs) for testing process management
  • Lightweight Flask-based server with minimal dependencies
  • Available as a Python package on PyPI

Installation

pip install fakenode

Quick Start

Running directly with Python

# Run a simulated node on port 9090 using the fakenode command
fakenode \
  --metrics-server-port 9090 \
  --show-version "v0.4.4" \
  --root-dir /tmp/test-node \
  --create-files

# Or run as a Python module
python3 -m fakenode.server \
  --metrics-server-port 9090 \
  --show-version "v0.4.4" \
  --root-dir /tmp/test-node \
  --create-files

Creating deployment scripts with fakeshell

For node management software that deploys nodes as executables, use fakeshell to generate shell script wrappers:

# Generate an executable script for a specific node version using the fakeshell command
fakeshell \
  --show-version "v0.4.4" \
  --output ./antnode

# Or run as a Python module
python3 -m fakenode.fakeshell \
  --show-version "v0.4.4" \
  --output ./antnode

# The generated script can now be used like a binary
./antnode \
  --metrics-server-port 9090 \
  --root-dir /tmp/test-node \
  --create-files

You can also customize the Python interpreter and enable file creation:

# Use a specific Python installation and enable file creation
fakeshell \
  --show-version "v0.5.0" \
  --python "/usr/local/bin/python3.11" \
  --create-files \
  --output ./antnode

# Or run as a Python module
python3 -m fakenode.fakeshell \
  --show-version "v0.5.0" \
  --python "/usr/local/bin/python3.11" \
  --create-files \
  --output ./antnode

The generated script contains editable variables for version, Python path, and file creation settings, allowing manual customization after generation.

Note: The --create-files option in fakeshell sets a variable in the generated script that controls whether the --create-files flag is passed to fakenode. This is a custom fakenode option not used by antctl or other node managers, so it must be configured either during script generation or by manually editing the CREATE_FILES variable in the generated script.

Use Cases

  • Testing node management software during development
  • Automated testing of monitoring systems
  • Simulating node behavior without resource overhead
  • Development environments where running real nodes isn't practical

Documentation

For detailed usage, API documentation, and all available command-line options, see FAKENODE.md.

License

MIT

Metadata

Release files for fakenode 0.4.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 fakenode 0.4.0
File Size Uploaded
fakenode-0.4.0.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fakenode 0.4.0
File Interpreter ABI Platform
fakenode-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / fakenode-0.4.0.tar.gz

Download URL fakenode-0.4.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1b9504832b634b15aacd8823f8fa575ba27e16a80510ab3a0afcfbd19089ecff
BLAKE2b-256 checksum
How to use checksums
b445236377e0913c8378cd9076227868fa37fd892baa3f7f28380f32d788c8ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / fakenode-0.4.0-py3-none-any.whl

Download URL fakenode-0.4.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9da368c6a174ef4a80feca61e322421b361bde06d8cb266bccb0d65951ddd916
BLAKE2b-256 checksum
How to use checksums
94b2d65385b67e99bc0dabbb5798d452a61b928b4049ca55fc4fbb496f17fcde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

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