Skip to main content

The all encompassing LuxOS python library.

Project description

LuxOS Tools Repository

This repository contains scripts we built to operate and troubleshoot miners running LuxOS.

Install

There are few ways to install the luxos package:

  1. Using pip (suggested for end-users):

    pip install luxos
    pip install git+https://github.com/LuxorLabs/luxos-tooling.git 
    

    Using pip gives you access to the cli commands luxos and health-checker as well the ability to import in python the import luxos.api api for luxos.

  2. A single drop in file (for support):

    curl -LO https://github.com/LuxorLabs/luxos-tooling/raw/luxos.pyz
    

    These are two standalone zipapp files, you can use from the command line as python luxos.pyz, no dependencies beside a recent-ish python version (eg. >= 3.10)

  3. From the github source checkout (for devs):

    python -m venv venv 
    source venv/bin/activate # for Windows: .\myenv\Scripts\activate)
    
    pip install -r tests/requirements.txt
    
    export PYTHONPATH=$(pwd)/src # for Windows: SET PYTHONPATH=%CD%\src
    (or)
    pip install -e .
    

LuxOS API Wrapper - luxos

This tool offers a convenient way to interact with LuxOS through a command-line interface (CLI) or as Python packages for more advanced integrations.

CLI Usage

The luxos.py script serves as a versatile LuxOS API wrapper, allowing users to interact with LuxOS features directly from the command line. Below are some basic examples:

python3 -m luxos --ipfile miners.csv --cmd rebootdevice --timeout 2
python3 -m luxos --range_start 192.168.1.0 --range_end 192.168.1.255 --cmd rebootdevice --verbose True

NOTE Please don't forget to set the PYTHONPATH.

Library Usage

If you prefer to integrate LuxOS functionality into your Python applications or scripts, luxos.py can also be used as a Python package. Here's a quick example:

from luxos.api import (execute_command)

execute_command("192.168.1.1", 4028, 2, "rebootdevice", "", False)

LuxOS HealthChecker - health_checker.py

The HealthChecker script is designed to continuously pull miner data from LuxOS, providing valuable insights into the health of your mining machines.

You can customize the HealthChecker params using the config.yaml file provided. To run the HealthChecker you can use health-checker if you installed using pip, or the cli python3 -m luxos.scripts.health_checker.


Feel free to explore and customize these tools to suit your specific needs. If you encounter any issues or have suggestions for improvement, please open an issue or submit a pull request.

You can find LuxOS API documentation here.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

luxos-0.0.2b7.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

luxos-0.0.2b7-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file luxos-0.0.2b7.tar.gz.

File metadata

  • Download URL: luxos-0.0.2b7.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for luxos-0.0.2b7.tar.gz
Algorithm Hash digest
SHA256 6ad49426f81b2c596e2afb8b92bf4227eb956f7e7b1bf5b36155a2d36c59b6ed
MD5 94bded191043a5cc8ffbb26c56a8b681
BLAKE2b-256 43ee2ff1c7bfa76cae4dd8729b1bb6de0f08a0ac2b6e8f74d920da1f4e007cd5

See more details on using hashes here.

File details

Details for the file luxos-0.0.2b7-py3-none-any.whl.

File metadata

  • Download URL: luxos-0.0.2b7-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for luxos-0.0.2b7-py3-none-any.whl
Algorithm Hash digest
SHA256 6d3405fd76e81e620e4b98a5731034a268b474158794a711d76e8c2223504951
MD5 73bc3ca238c59181a4f56c4151694844
BLAKE2b-256 530222bbb6c7d233943ae3baa15f302614ae7efb8e6099b3561f489e52199986

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page