semvec/pypi-packages huggingface dataset:
gadopenapiconv 0.1.0
Add your description here
Requires Python: >=3.8

<p align="center">
  <a href="https://github.com/AlexDemure/gadopenapiconv">
    <a href="https://ibb.co/Gf7HQHwJ"><img src="https://i.ibb.co/nqrPMP20/logo.png" alt="logo" border="0"></a>
  </a>
</p>

<p align="center">
  A CLI tool that generates HTTP clients from an OpenAPI specification.
</p>

---

## Installation

```
pip install gadopenapiconv
```

## Usage

Run the code generation process:

```sh
gadopenapiconv --file {config.toml} --context "{}"
```

### General Structure

```
workdir = "myproject"

[[specifications]]
path = "{{name}}.py"
content = "file:openapi.json"
model = "pydantic"
async = true
operations = []

[[scripts]]
command = "isort {{workdir}}"
check = true
```

### Sections Overview
| Section              | Format                               | Description                                                              |   |   |
|----------------------|--------------------------------------|--------------------------------------------------------------------------|---|---|
| `workdir`            | `""`                                 | Uses the current directory                                               |   |   |
|                      | `"myproject"`                        | Uses the current directory + `/myproject`                                |   |   |
|                      | `"/home/myproject"`                  | Uses an absolute path                                                    |   |   |
| `[[specifications]]` |                                      | Defines file creation rules                                              |   |   |
|                      | `mode = "a"`                         | File writing mode: `"a"` (append), `"w"` (overwrite)                     |   |   |
|                      | `path = "src/__init__.py"`           | Relative to workdir, specifies file location.                            |   |   |
|                      | `content = """ ... """ / path / url` | Raw content, local file path, or URL for remote content.                 |   |   |
|                      | `model = "pydantic"`                 | Type of models created                                                   |   |   |
|                      | `async = "true"`                     | Type of methods                                                          |   |   |
|                      | `operations = []`                    | Filtering methods by operation_id                                        |   |   |
| `[[scripts]]`        |                                      | Defines commands to be executed after generation.                        |   |   |
|                      | `command = "isort {{workdir}}"`      | Command to execute, supports dynamic variables.                          |   |   |
|                      | `check = True\False"`                | If true, raises an error if the command fails, otherwise logs output.    |   |   |