Skip to main content

This is a toolkit library for the LLM application using the multiple openapi specifications

Project description

zmp-openapi-toolkit

Platform Badge Component Badge CI Badge License Badge PyPI - Version PyPI - Implementation PyPI - Python Version PyPI - Wheel

Introduction

This is a toolkit library for the LLM application using the multiple openapi specifications

Key Features

  • Support the OpenAPI request wrapper
  • OpenAPI parameters and request type validation
  • Convenient authentication management

Installation

Install using pip:

pip install zmp-openapi-toolkit

Install using poetry:

poetry add zmp-openapi-toolkit

Usage

Basic example:

import logging
import logging.config
from typing import List

from zmp_openapi_toolkit import (
    MixedAPISpecConfig,
    ZmpAPIWrapper,
    ZmpTool,
    ZmpToolkit,
)

logging.getLogger("zmp_openapi_toolkit.openapi.zmpapi_models").setLevel(logging.INFO)
logging.getLogger("zmp_openapi_toolkit.toolkits.toolkit").setLevel(logging.INFO)

if __name__ == "__main__":
    mixed_api_spec_config = MixedAPISpecConfig.from_mixed_spec_file(
        file_path="samples/openapi/zmp_mixed_api_spec.json"
    )

    zmp_api_wrapper = ZmpAPIWrapper(
        "https://your.server.com", mixed_api_spec_config=mixed_api_spec_config
    )
    toolkit = ZmpToolkit.from_zmp_api_wrapper(zmp_api_wrapper=zmp_api_wrapper)
    tools: List[ZmpTool] = toolkit.get_tools()

For more detailed usage instructions, please refer to our documentation.

Development Setup

  1. Clone the repository
git clone https://github.com/yourusername/zmp-openapi-toolkit.git
cd zmp-openapi-toolkit
  1. Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate  # Windows: venv\Scripts\activate
  1. Install development dependencies
poetry install

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zmp_openapi_toolkit-0.1.10.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zmp_openapi_toolkit-0.1.10-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file zmp_openapi_toolkit-0.1.10.tar.gz.

File metadata

  • Download URL: zmp_openapi_toolkit-0.1.10.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.10 Darwin/24.3.0

File hashes

Hashes for zmp_openapi_toolkit-0.1.10.tar.gz
Algorithm Hash digest
SHA256 d3f1243e9374f59d6d1d551490d7f55c8b305c4c78c2bc66e5d138454e16eb4a
MD5 96f603b2ed4951608e0b5ab649eed98e
BLAKE2b-256 26a544199c340871a377d5fe554236d314f759cb55ccf8b88deb3ec78c243b01

See more details on using hashes here.

File details

Details for the file zmp_openapi_toolkit-0.1.10-py3-none-any.whl.

File metadata

File hashes

Hashes for zmp_openapi_toolkit-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 44593fbea0e3383899e4dcf95ea8a5b2e6b7eecafc9bd404e27ceb00200bf5d6
MD5 05c7ae7a26f60e431f63014bfad27ccf
BLAKE2b-256 1e6be5a6fd535b7ac8bf80dd93c80cd6436e4f57e425444a924421c41636cbf1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page