Skip to content

epflgraph/graphdb-client

Repository files navigation

Project logo

License Latest Release on Github GitHub Stars Contributors Last Commit Open Issues Open PRs

Why Graph?

The Graph Data Platform - developed by the AI engineering team at the EPFL Center for Digital Education - is an open-source alternative to proprietary research information systems like Elsevier Pure. It federates educational and institutional data into a semantically interconnected knowledge graph of people, publications, labs, startups, courses, video lectures, and other educational resources. The GraphSearch application provides lightning-fast search and discovery of the knowledge graph, as well as LLM-powered chatbot interaction with the indexed resources.

List of Graph services:
Registry | AI | Ontology | Search | Chat | Dash | DB client | ES client

Graph DB Client

Graph DB Client is a Python-based command-line interface (CLI) tool designed to facilitate the management and interaction with the Graph Data Platform's underlying MySQL database. It provides a unified interface for performing various database operations, including configuration management, data import/export, and server administration tasks. The CLI is built using Python's argparse library, allowing users to execute commands in a structured and intuitive manner.

Configuration

The CLI expects a config.yaml file (repository root format) describing database environments and MySQL binaries. Use the provided config.example.yaml as a template to create your own configuration.

Installation

🐳 Deploy with Docker

The Graph DB Client is available as a Docker image, which provides a convenient way to run the CLI without needing to set up a local Python environment. The image includes all necessary dependencies and can be easily updated by pulling the latest version from Docker Hub.

Steps to deploy with Docker:

  1. Pull the image:

    docker pull epflgraph/graphdb-client:latest
  2. Run the CLI help:

    docker run --rm epflgraph/graphdb-client:latest -h
  3. Run with your local configuration mounted (recommended):

    docker run --rm \
    -v "$(pwd)/config.yaml:/app/config.yaml:ro" \
    epflgraph/graphdb-client:latest test --env <env_name>

To run commands as graphdb [cmd], add this to your ~/.zshrc file:

graphdb() {
  docker run --rm \
    -v "$PWD/config.yaml:/app/config.yaml:ro" \
    epflgraph/graphdb-client:latest "$@"
}

Then reload your shell:

source ~/.zshrc

Test with:

graphdb test --env <env_name>

👨🏻‍💻 Local installation

For users who prefer to run the CLI directly on their local machine, follow these steps to set up a Python virtual environment and install the package:

  1. Clone the repository:

    git clone https://github.com/epflgraph/graphdb-client.git
    cd graphdb-client
  2. Create and activate a virtual environment:

    python3 -m venv .venv.graphdb
    source .venv.graphdb/bin/activate
  3. Install the package:

    pip install .
  4. Verify installation:

    graphdb -h
  5. To test the connection to a database environment:

    graphdb test --env <env_name>

About

General purpose client for interacting with a MySQL server in the Graph ecosystem.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors