Skip to content

New client proposition #532

Closed
Closed

Description

@lperdereau

In my case I want to generate a client to interact with cloud-hypervisor.
This means, the generated OA Client has to query a socket and not a common HTTP server. I saw your project is using httpx, with whom it is possible to query a socket when specifying a special transport type doc, but it is currently not possible to specify a specific transport type when generating a client.

We could make a new client generation allowing us to take adventage of httpx's features.
As an example, it could be interesting to generate something like this :

from cloud_hypervisor_api_client import Client as CloudHypervisorClient
transport = httpx.HTTPTransport(uds="/var/run/docker.sock")

client = CloudHypervisorClient(transport=transport, base_url="https://api.example.com")
client.vm.get()
client.vm.list()
client.vm.create(VMObject)
client.vm.delete(VMObject)

Activity

  1. dbanty commented on Oct 29, 2021

    @dbanty
    Collaborator

    Is the transport something you can set on the httpx Client? Meaning would #202 potentially solve this?

  2. lperdereau commented on Oct 29, 2021

    @lperdereau
    Author

    Actually yes I could set it on the httpx Client, this issue will solved transport methods.

  3. added this to the 0.15.0 milestone on Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions