Metadata-Version: 2.4
Name: g2c
Version: 0.1.0
Summary: g2c is a python script to convert Gremlin query to Cypher query with OpenAI API
Project-URL: Homepage, https://github.com/rioriost/homebrew-g2c
Project-URL: Issues, https://github.com/rioriost/homebrew-g2c/issues
Author-email: Rio Fujita <rifujita@microsoft.com>
License: MIT License
        
        Copyright (c) 2025 Rio Fujita
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: openai>=1.63.0
Description-Content-Type: text/markdown

# g2c

![License](https://img.shields.io/badge/license-MIT-blue.svg)

## Overview

g2c is a python script to convert Gremlin query to Cypher query with OpenAI API

## Table of Contents

- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [Usage](#usage)
- [Release Notes](#release-notes)
- [License](#license)

## Installation

Just add tap and install homebrew package.

```bash
brew tap rioriost/g2c
brew install g2c
```

## Prerequisites

- Python 3.11 or higher
- [OpenAI API key](https://platform.openai.com/account/api-keys) enabled to call gpt-4o-mini

## Usage

Execute g2c command.

```bash
g2c --help
usage: g2c [-h] gremlin_query

Convert Gremlin queries to Cypher queries.

positional arguments:
  gremlin_query  The Gremlin query to convert.

options:
  -h, --help     show this help message and exit
```

The indentical usage is shown below.

```bash
g2c 'g.V().has(“name”, “Alice”).as(“a”).V().has(“name”, “Bob”).as(“b”).select(“a”, “b”).by(“name”)'
MATCH (a {name: "Alice"}), (b {name: "Bob"}) RETURN a.name AS a, b.name AS b
```

## Release Notes

### 0.1.0 Release
* Initial release.

## License
MIT License
