openapi_client_gladkiyva


Nameopenapi_client_gladkiyva JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryTemplate web service
upload_time2024-02-27 15:44:30
maintainer
docs_urlNone
authorHIRO-MicroDataCenters
requires_python>=3.7,<4.0
licenseMIT
keywords openapi openapi-generator template web service
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python client
API version: 0.1.0

## Requirements

- Python 3.7+
- Docker engine. [Documentation](https://docs.docker.com/engine/install/)

## Installation & Usage

1. If you don't have `Poetry` installed run:

```bash
pip install poetry
```

2. Install dependencies:

```bash
poetry config virtualenvs.in-project true
poetry install --no-root
```

3. Running tests:

```bash
poetry run pytest
```

4. Building package:

```bash
poetry build
```

5. Publishing
```bash
poetry config pypi-token.pypi <pypi token>
poetry publish
```

## Client generator
To generate the client, execute the following script from the project root folder
```bash
poetry --directory server run python ./tools/client_generator/generate.py --file ./api/openapi.yaml
```

### Command
```bash
generate.py [--file <a path or URL to a .yaml file>] [--asyncio]
```

#### Arguments
**--file**
Specifies the input OpenAPI specification file path or URL. This argument is required for generating the Python client. The input file can be either a local file path or a URL pointing to the OpenAPI schema.

**--asyncio**
Flag to indicate whether to generate asynchronous code. If this flag is provided, the generated Python client will include asynchronous features. By default, synchronous code is generated.

#### Saving Arguments

The script saves provided arguments for future use. Upon the initial execution, if no arguments are provided, the script will check if there are previously saved arguments in the specified file path. If saved arguments are found, they will be loaded and used for generating the client. If no saved arguments are found or if new arguments are provided, the script will save the provided arguments for future use.

This mechanism ensures that users can omit specifying arguments on subsequent executions if the same arguments were used previously. Saved arguments are stored in a JSON file located at generator/args.json.

#### Examples

```bash
python generate.py --file https://<domain>/openapi.json
python generate.py --file https://<domain>/openapi.json --asyncio
python generate.py --file /<path>/openapi.yaml
python generate.py --file /<path>/openapi.yaml --asyncio
python generate.py
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "http://localhost"
)



# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.DefaultApi(api_client)

    try:
        # Example endpoint
        api_response = api_instance.example_get()
        print("The response of DefaultApi->example_get:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DefaultApi->example_get: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**example_get**](docs/DefaultApi.md#example_get) | **GET** / | Example endpoint
*ItemsApi* | [**items_create**](docs/ItemsApi.md#items_create) | **POST** /item/ | Create an item
*ItemsApi* | [**items_delete_item**](docs/ItemsApi.md#items_delete_item) | **DELETE** /item/{id}/ | Delete an item
*ItemsApi* | [**items_read_all**](docs/ItemsApi.md#items_read_all) | **GET** /item/ | Read all items
*ItemsApi* | [**items_read_item**](docs/ItemsApi.md#items_read_item) | **GET** /item/{id}/ | Read an item
*ItemsApi* | [**items_update_item**](docs/ItemsApi.md#items_update_item) | **PUT** /item/{id}/ | Update an item


## Documentation For Models

 - [ExampleResponse](docs/ExampleResponse.md)
 - [HTTPValidationError](docs/HTTPValidationError.md)
 - [Item](docs/Item.md)
 - [ValidationError](docs/ValidationError.md)
 - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization

Endpoints do not require authorization.


## Author

all-hiro@hiro-microdatacenters.nl



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "openapi_client_gladkiyva",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "OpenAPI,OpenAPI-Generator,Template web service",
    "author": "HIRO-MicroDataCenters",
    "author_email": "all-hiro@hiro-microdatacenters.nl",
    "download_url": "https://files.pythonhosted.org/packages/90/59/7ea911a444c6375aceb02fb82f288ea4d56825f1babea8e3d50cb39d4cea/openapi_client_gladkiyva-1.0.0.tar.gz",
    "platform": null,
    "description": "# Python client\nAPI version: 0.1.0\n\n## Requirements\n\n- Python 3.7+\n- Docker engine. [Documentation](https://docs.docker.com/engine/install/)\n\n## Installation & Usage\n\n1. If you don't have `Poetry` installed run:\n\n```bash\npip install poetry\n```\n\n2. Install dependencies:\n\n```bash\npoetry config virtualenvs.in-project true\npoetry install --no-root\n```\n\n3. Running tests:\n\n```bash\npoetry run pytest\n```\n\n4. Building package:\n\n```bash\npoetry build\n```\n\n5. Publishing\n```bash\npoetry config pypi-token.pypi <pypi token>\npoetry publish\n```\n\n## Client generator\nTo generate the client, execute the following script from the project root folder\n```bash\npoetry --directory server run python ./tools/client_generator/generate.py --file ./api/openapi.yaml\n```\n\n### Command\n```bash\ngenerate.py [--file <a path or URL to a .yaml file>] [--asyncio]\n```\n\n#### Arguments\n**--file**\nSpecifies the input OpenAPI specification file path or URL. This argument is required for generating the Python client. The input file can be either a local file path or a URL pointing to the OpenAPI schema.\n\n**--asyncio**\nFlag to indicate whether to generate asynchronous code. If this flag is provided, the generated Python client will include asynchronous features. By default, synchronous code is generated.\n\n#### Saving Arguments\n\nThe script saves provided arguments for future use. Upon the initial execution, if no arguments are provided, the script will check if there are previously saved arguments in the specified file path. If saved arguments are found, they will be loaded and used for generating the client. If no saved arguments are found or if new arguments are provided, the script will save the provided arguments for future use.\n\nThis mechanism ensures that users can omit specifying arguments on subsequent executions if the same arguments were used previously. Saved arguments are stored in a JSON file located at generator/args.json.\n\n#### Examples\n\n```bash\npython generate.py --file https://<domain>/openapi.json\npython generate.py --file https://<domain>/openapi.json --asyncio\npython generate.py --file /<path>/openapi.yaml\npython generate.py --file /<path>/openapi.yaml --asyncio\npython generate.py\n```\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```python\n\nimport openapi_client\nfrom openapi_client.rest import ApiException\nfrom pprint import pprint\n\n# Defining the host is optional and defaults to http://localhost\n# See configuration.py for a list of all supported configuration parameters.\nconfiguration = openapi_client.Configuration(\n    host = \"http://localhost\"\n)\n\n\n\n# Enter a context with an instance of the API client\nwith openapi_client.ApiClient(configuration) as api_client:\n    # Create an instance of the API class\n    api_instance = openapi_client.DefaultApi(api_client)\n\n    try:\n        # Example endpoint\n        api_response = api_instance.example_get()\n        print(\"The response of DefaultApi->example_get:\\n\")\n        pprint(api_response)\n    except ApiException as e:\n        print(\"Exception when calling DefaultApi->example_get: %s\\n\" % e)\n\n```\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *http://localhost*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*DefaultApi* | [**example_get**](docs/DefaultApi.md#example_get) | **GET** / | Example endpoint\n*ItemsApi* | [**items_create**](docs/ItemsApi.md#items_create) | **POST** /item/ | Create an item\n*ItemsApi* | [**items_delete_item**](docs/ItemsApi.md#items_delete_item) | **DELETE** /item/{id}/ | Delete an item\n*ItemsApi* | [**items_read_all**](docs/ItemsApi.md#items_read_all) | **GET** /item/ | Read all items\n*ItemsApi* | [**items_read_item**](docs/ItemsApi.md#items_read_item) | **GET** /item/{id}/ | Read an item\n*ItemsApi* | [**items_update_item**](docs/ItemsApi.md#items_update_item) | **PUT** /item/{id}/ | Update an item\n\n\n## Documentation For Models\n\n - [ExampleResponse](docs/ExampleResponse.md)\n - [HTTPValidationError](docs/HTTPValidationError.md)\n - [Item](docs/Item.md)\n - [ValidationError](docs/ValidationError.md)\n - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md)\n\n\n<a id=\"documentation-for-authorization\"></a>\n## Documentation For Authorization\n\nEndpoints do not require authorization.\n\n\n## Author\n\nall-hiro@hiro-microdatacenters.nl\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Template web service",
    "version": "1.0.0",
    "project_urls": null,
    "split_keywords": [
        "openapi",
        "openapi-generator",
        "template web service"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5961dbf39c875843b77171da012b5ee4b239d07a9d04b95d6c805d7fd2c91e76",
                "md5": "b56c42130395cda50f7eea7baacca3f0",
                "sha256": "8469b56d3f48f32dfebaea6745419079abebe56c05bf04a9000be2b828b6dd26"
            },
            "downloads": -1,
            "filename": "openapi_client_gladkiyva-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b56c42130395cda50f7eea7baacca3f0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 19191,
            "upload_time": "2024-02-27T15:44:25",
            "upload_time_iso_8601": "2024-02-27T15:44:25.377496Z",
            "url": "https://files.pythonhosted.org/packages/59/61/dbf39c875843b77171da012b5ee4b239d07a9d04b95d6c805d7fd2c91e76/openapi_client_gladkiyva-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "90597ea911a444c6375aceb02fb82f288ea4d56825f1babea8e3d50cb39d4cea",
                "md5": "747ece89f865c0fbf4da03dc1825bad0",
                "sha256": "f4975d3caa134aa17bed4feff419ac6454742ec008de409f5364c343a61f7930"
            },
            "downloads": -1,
            "filename": "openapi_client_gladkiyva-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "747ece89f865c0fbf4da03dc1825bad0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 22169,
            "upload_time": "2024-02-27T15:44:30",
            "upload_time_iso_8601": "2024-02-27T15:44:30.980557Z",
            "url": "https://files.pythonhosted.org/packages/90/59/7ea911a444c6375aceb02fb82f288ea4d56825f1babea8e3d50cb39d4cea/openapi_client_gladkiyva-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-27 15:44:30",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "openapi_client_gladkiyva"
}
        
Elapsed time: 0.19166s