
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
A tool to fetch and record ShadowDrive node statistics from an API and save them to a CSV file.
This Python package, shdw-node-stats
, is designed to fetch and record information about blockchain nodes. It has two features:
Retrieve data such as the node's rank, total rewards, and status from a specified API endpoint, then records this information in a CSV file for chart purpose if you need.
Send notification to your Telegram when the node status is not_eligible
.
To install shdw-node-stats
as a package, simply use pip:
pip install shdw-node-stats
This command installs shdw-node-stats
along with all required dependencies. Ensure you have Python installed on your system (version 3.8 or later is recommended).
If you prefer to use NodeStats.py
as a standalone script:
Ensure you have Python installed on your system (version 3.8 or later is recommended) and clone the repository or download the script.
Install the required dependencies:
pip install -r requirements.txt
Prepare a file named nodes.txt
or nodes.json
with the node addresses.
Run the script from the terminal or command prompt:
python3 NodeStats.py
To install shdw-node-stats
as a package, simply use pip:
pip install shdw-node-stats
This command installs shdw-node-stats
along with all required dependencies. Ensure you have Python installed on your system (version 3.8 or later is recommended). After installing shdw-node-stats
via pip, you can use it in your Python scripts as follows:
Prepare a file named nodes.txt
or nodes.json
containing the addresses of the nodes you wish to query.
Use the package in your script:
from shdw_node_stats import NodeStats
# Assuming you have a 'nodes.txt' or 'nodes.json' file in your current directory
node_stats = NodeStats('nodes.txt') # or NodeStats('nodes.json')
node_stats.run()
This will fetch the node information and output it to a CSV file named node_rankings.csv
.
Both usage methods generate a CSV file named node_rankings.csv
, which includes the following columns: Timestamp, Node Address, Rank, Rewards, and Status. The console output will display the node information and the total rewards accumulated by the nodes listed in the input file.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE for more information.
This package/script is intended for educational and demonstration purposes. It showcases how to interact with web APIs, process data in Python, and write output to a CSV file. Ensure you have the necessary permissions to use the API and data.
FAQs
A tool to fetch and record ShadowDrive node statistics from an API and save them to a CSV file.
We found that shdw-node-stats demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.