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
/metadataand/metricsendpoints 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fakenode-0.4.0.tar.gz | 9.0 kB | Without provenance | Details for fakenode-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fakenode-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for fakenode-0.4.0-py3-none-any.whl |
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
|
Security for fakenode 0.4.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.