robotnetwork


Namerobotnetwork JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/gorefbitim/robotnetwork
SummaryA tool to relay http message from venus to slack.
upload_time2024-08-22 13:48:55
maintainerNone
docs_urlNone
authorOfer Rahat
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Robotnetwork

A FastAPI server that relays HTTP requests from VENUS (Hamilton robot language)
to Slack via webhooks for streamlined robot notifications.

## Project Overview

This project focuses on establishing seamless communication between robotic
systems (specifically VENUS-enabled Hamilton robots) and Slack, providing
real-time notifications through webhooks. This enables efficient monitoring
and immediate response capabilities directly within Slack channels.

## Advantages of Using a Relay Server

Although it is theoretically possible to directly use HTTPS from VENUS to
communicate with Slack, employing a relay server like the one provided in
this project offers several advantages:

- **Flexibility**: The relay server can easily adapt to various data formats
  and communication protocols, making it simpler to integrate and manage
  different types of messages or data that need to be sent to Slack.
- **Protocol Compatibility**: In scenarios where direct HTTPS communication
  from VENUS does not meet the specific protocols required by Slack, the relay
  server acts as an intermediary, ensuring that messages are formatted and
  transmitted correctly according to Slack's specifications.
- **Enhanced Security**: Using a relay server allows for additional layers
  of security checks and data validation before messages are forwarded to Slack,
  reducing the risk of leaking proprietary data by the scientist.

These benefits make the relay approach more robust and versatile for real-time
communication between robotic systems and Slack channels.


## Features

- **Hamilton VENUS Example**: Utilizes the official Hamilton HTTP
  library to send text to the relay server.
- **FastAPI Server**: Manages HTTP requests from the VENUS robot system
  to relay messages effectively.
- **Slack Integration**: Posts status updates or alerts directly to a
  configured Slack channel via webhooks.
- **Easy Configuration**: Leverages environment variables for Slack webhook
  URLs and other settings to simplify setup and adjustments.


## Prerequisites
To run this application, you will need the following:

- **Hamilton VENUS**: Ensure you have access to the Hamilton VENUS software or
  ystem.
- **Python 3.x**: A compatible version of Python.
- **pip**: Python's package installer, required for managing external
  libraries.
- **Virtualenv**: Optional but recommended for creating isolated Python
  environments. This ensures that dependencies required by the project
  do not interfere with those of other Python projects on the same system.

## Installation

### 1. Install the Package
To install the current release of the package, use pip:

```pip install robotnetwork```

### 2. Setup Slack web-hook

This section guides you through configuring a Slack webhook to receive
notifications from your VENUS application based on any logic you implement.
Follow these steps to create and set up a Slack app that can send notifications
directly to your chosen Slack channel.

2.1. **Create a Slack App:**
   - Go to the [Slack API](https://api.slack.com/apps) page and click on
     "Create New App" (ensure you are signed in).
   - Choose "From scratch," name your app, and select the Slack workspace
     where you want to send notifications.
   - Click "Create App."

2.2. **Configure Incoming Webhooks:**
   - In your app settings, navigate to "Incoming Webhooks" from the sidebar.
   - Enable the feature by toggling the activation switch to "On."
   - Click "Add New Webhook to Workspace" and choose the Slack channel
     where you wish to receive notifications.
   - Slack will generate a Webhook URL; copy this URL as it will be used during
     setup, so that the server can send notifications from your application.

### 3. Run the Server
Run the FastAPI server using this command:

```robotnetwork```

### 4. Initial Setup
During the first run, you will be prompted to input the Slack webhook URL:

**"Enter your Slack webhook URL: "**

Upon entering the URL, it will be securely saved in your home directory,
ensuring it's not exposed or hardcoded in your application code.

#### Note: Where is the URL saved?
- Unix Systems: The URL is stored in the home directory identified by the HOME
environment variable. If HOME is not set, the home directory is determined
using the system's password directory.

- Windows Systems: The URL is saved in the directory specified by USERPROFILE.
If USERPROFILE is not set, it combines HOMEPATH and HOMEDRIVE to determine the
correct location.

This setup provides a secure and convenient way to store sensitive
configuration data, making it easily accessible for your application
while maintaining good security practices.

### 5. Setup VENUS method to send http requests to the server
5.1  Install HSLHttp
Before you can add Slack notifications to your VENUS methods, you need to
install the HSLHttp tool. This installation is crucial for enabling HTTP
requests from within VENUS scripts.

On your VENUS (Windows) computer:
```run_installer.bat```

Safe and Verified Source: The HSLHttp tool is developed and distributed by
Hamilton, ensuring that it is safe and reliable. This can be verified through
the included installer and documentation files within the 'HSLHttp' directory
in our repository.

5.2: Incorporate HTTP Requests in Your Method
Once HSLHttp is installed, you can add HTTP request capabilities to your VENUS
methods to send notifications to the server.

Modify Your VENUS Method: Integrate HTTP request sections into your VENUS method
scripts. Use the provided aliquotes_1_3_slack.hsl file as a template for how to
structure these requests within your method.

## Conclusion
By automating or guiding the installation of necessary tools and integrating
HTTP functionality into your VENUS methods, you can enhance the automation
capabilities of your lab setups, ensuring effective communication via Slack
notifications.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gorefbitim/robotnetwork",
    "name": "robotnetwork",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Ofer Rahat",
    "author_email": "leofer@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4e/f7/bbd50bd457e6584839c290daadcbbe713d7fec1b3f85724ba1a3be56df98/robotnetwork-0.1.4.tar.gz",
    "platform": null,
    "description": "# Robotnetwork\n\nA FastAPI server that relays HTTP requests from VENUS (Hamilton robot language)\nto Slack via webhooks for streamlined robot notifications.\n\n## Project Overview\n\nThis project focuses on establishing seamless communication between robotic\nsystems (specifically VENUS-enabled Hamilton robots) and Slack, providing\nreal-time notifications through webhooks. This enables efficient monitoring\nand immediate response capabilities directly within Slack channels.\n\n## Advantages of Using a Relay Server\n\nAlthough it is theoretically possible to directly use HTTPS from VENUS to\ncommunicate with Slack, employing a relay server like the one provided in\nthis project offers several advantages:\n\n- **Flexibility**: The relay server can easily adapt to various data formats\n  and communication protocols, making it simpler to integrate and manage\n  different types of messages or data that need to be sent to Slack.\n- **Protocol Compatibility**: In scenarios where direct HTTPS communication\n  from VENUS does not meet the specific protocols required by Slack, the relay\n  server acts as an intermediary, ensuring that messages are formatted and\n  transmitted correctly according to Slack's specifications.\n- **Enhanced Security**: Using a relay server allows for additional layers\n  of security checks and data validation before messages are forwarded to Slack,\n  reducing the risk of leaking proprietary data by the scientist.\n\nThese benefits make the relay approach more robust and versatile for real-time\ncommunication between robotic systems and Slack channels.\n\n\n## Features\n\n- **Hamilton VENUS Example**: Utilizes the official Hamilton HTTP\n  library to send text to the relay server.\n- **FastAPI Server**: Manages HTTP requests from the VENUS robot system\n  to relay messages effectively.\n- **Slack Integration**: Posts status updates or alerts directly to a\n  configured Slack channel via webhooks.\n- **Easy Configuration**: Leverages environment variables for Slack webhook\n  URLs and other settings to simplify setup and adjustments.\n\n\n## Prerequisites\nTo run this application, you will need the following:\n\n- **Hamilton VENUS**: Ensure you have access to the Hamilton VENUS software or\n  ystem.\n- **Python 3.x**: A compatible version of Python.\n- **pip**: Python's package installer, required for managing external\n  libraries.\n- **Virtualenv**: Optional but recommended for creating isolated Python\n  environments. This ensures that dependencies required by the project\n  do not interfere with those of other Python projects on the same system.\n\n## Installation\n\n### 1. Install the Package\nTo install the current release of the package, use pip:\n\n```pip install robotnetwork```\n\n### 2. Setup Slack web-hook\n\nThis section guides you through configuring a Slack webhook to receive\nnotifications from your VENUS application based on any logic you implement.\nFollow these steps to create and set up a Slack app that can send notifications\ndirectly to your chosen Slack channel.\n\n2.1. **Create a Slack App:**\n   - Go to the [Slack API](https://api.slack.com/apps) page and click on\n     \"Create New App\" (ensure you are signed in).\n   - Choose \"From scratch,\" name your app, and select the Slack workspace\n     where you want to send notifications.\n   - Click \"Create App.\"\n\n2.2. **Configure Incoming Webhooks:**\n   - In your app settings, navigate to \"Incoming Webhooks\" from the sidebar.\n   - Enable the feature by toggling the activation switch to \"On.\"\n   - Click \"Add New Webhook to Workspace\" and choose the Slack channel\n     where you wish to receive notifications.\n   - Slack will generate a Webhook URL; copy this URL as it will be used during\n     setup, so that the server can send notifications from your application.\n\n### 3. Run the Server\nRun the FastAPI server using this command:\n\n```robotnetwork```\n\n### 4. Initial Setup\nDuring the first run, you will be prompted to input the Slack webhook URL:\n\n**\"Enter your Slack webhook URL: \"**\n\nUpon entering the URL, it will be securely saved in your home directory,\nensuring it's not exposed or hardcoded in your application code.\n\n#### Note: Where is the URL saved?\n- Unix Systems: The URL is stored in the home directory identified by the HOME\nenvironment variable. If HOME is not set, the home directory is determined\nusing the system's password directory.\n\n- Windows Systems: The URL is saved in the directory specified by USERPROFILE.\nIf USERPROFILE is not set, it combines HOMEPATH and HOMEDRIVE to determine the\ncorrect location.\n\nThis setup provides a secure and convenient way to store sensitive\nconfiguration data, making it easily accessible for your application\nwhile maintaining good security practices.\n\n### 5. Setup VENUS method to send http requests to the server\n5.1  Install HSLHttp\nBefore you can add Slack notifications to your VENUS methods, you need to\ninstall the HSLHttp tool. This installation is crucial for enabling HTTP\nrequests from within VENUS scripts.\n\nOn your VENUS (Windows) computer:\n```run_installer.bat```\n\nSafe and Verified Source: The HSLHttp tool is developed and distributed by\nHamilton, ensuring that it is safe and reliable. This can be verified through\nthe included installer and documentation files within the 'HSLHttp' directory\nin our repository.\n\n5.2: Incorporate HTTP Requests in Your Method\nOnce HSLHttp is installed, you can add HTTP request capabilities to your VENUS\nmethods to send notifications to the server.\n\nModify Your VENUS Method: Integrate HTTP request sections into your VENUS method\nscripts. Use the provided aliquotes_1_3_slack.hsl file as a template for how to\nstructure these requests within your method.\n\n## Conclusion\nBy automating or guiding the installation of necessary tools and integrating\nHTTP functionality into your VENUS methods, you can enhance the automation\ncapabilities of your lab setups, ensuring effective communication via Slack\nnotifications.\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A tool to relay http message from venus to slack.",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/gorefbitim/robotnetwork"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b84d39aa996dd78b0292e3aecc14d9d8856bed031b131665dd7bce753a3837d",
                "md5": "59b6d94934ef82858c151882cb43fa0a",
                "sha256": "55d57572d98af52a9d24309c6112aa563bd2aae3e9914e3edb020ae6540b9149"
            },
            "downloads": -1,
            "filename": "robotnetwork-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "59b6d94934ef82858c151882cb43fa0a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 17819,
            "upload_time": "2024-08-22T13:48:54",
            "upload_time_iso_8601": "2024-08-22T13:48:54.216579Z",
            "url": "https://files.pythonhosted.org/packages/3b/84/d39aa996dd78b0292e3aecc14d9d8856bed031b131665dd7bce753a3837d/robotnetwork-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ef7bbd50bd457e6584839c290daadcbbe713d7fec1b3f85724ba1a3be56df98",
                "md5": "6b43b656c46f3fc156c17ef08bf63687",
                "sha256": "fc20300714989f5dfe79294ed5624a99c32e2641487379e70c5acd7a6339c6a1"
            },
            "downloads": -1,
            "filename": "robotnetwork-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "6b43b656c46f3fc156c17ef08bf63687",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17845,
            "upload_time": "2024-08-22T13:48:55",
            "upload_time_iso_8601": "2024-08-22T13:48:55.994951Z",
            "url": "https://files.pythonhosted.org/packages/4e/f7/bbd50bd457e6584839c290daadcbbe713d7fec1b3f85724ba1a3be56df98/robotnetwork-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 13:48:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gorefbitim",
    "github_project": "robotnetwork",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "robotnetwork"
}
        
Elapsed time: 0.54189s