Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GUI for the hydra python agent

License

NotificationsYou must be signed in to change notification settings

HTTP-APIs/hydra-python-agent-gui

Repository files navigation

This is a GUI for theHydra Ecosystem's Agent. It's divided in two parts: the left side shows the Hydra API as a linked graph and at the right you have a generic console built based on the API Documentation that you can use to query the API. The Frontend was built with React, a middle layer to use the Agent was built with Flask.

Agent GUI Picture

Installing Requirements

It's recommended that you use venv(virtual environment):

sudo apt-get install python3-venv # If not installedpython3 -m venv venvsource venv/bin/activatepip3 install -r requirements.txt

Running Redis Graph

The Agent uses a Redis local server as a caching layer. That said, it's necessary that you run Redis Graph locally:

sudo ./redis_setup.sh # <- Might be necessary to uso sudo

Running hydrus server

Since this is an API Client, we need an appropriate hydrus server to query to. To setup a localhost follow the instructions athttps://github.com/HTTP-APIs/hydrus#demo.

Running the GUI

If you've installed the Requirements and have the proper Redis running you can simply:

python3 app.py

Now open your browser and enjoy at:http://localhost:3000/

Contributing to the GUI

This repository is divided in two parts, the Middle-Layer/Backend with Flask underapp.py and the React project under the folderconsole-frontend.

The Flask Backend is built to communicate with the Python Agent package. It declares five endpoints which are used for this:

  • send-command - Send Commands to Agent and returns the server response
  • /hydra-doc - Simply serves the Hydra Doc
  • apidoc-graph - Fetches Hydra Doc from the Agent, process it in Vis.js Network format and returns it to the GUI
  • /start-agent - Simply starts/restarts the Agent with the URL parameter
  • / - Serves the React build under /console-frontend/build

The React Frontend

Go the the README.md insideconsole-frontend for further information. If you make modifications insideconsole-frontend, make sure to runnpm run build to create a updated production build.

About

GUI for the hydra python agent

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors17


[8]ページ先頭

©2009-2025 Movatter.jp