Skip to main content

Autogenerated Windmill OpenApi Client

This is the raw autogenerated api client. You are most likely more interested in wmill which leverages this client to offer an user friendly experience. We use this openapi python client generator

windmill-api

A client library for accessing Windmill API

Usage

First, create a client:

from windmill_api import Client

client = Client(base_url="https://api.example.com")

If the endpoints you're going to hit require authentication, use AuthenticatedClient instead:

from windmill_api import AuthenticatedClient

client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken")

Now call your endpoint and use your models:

from windmill_api.models import MyDataModel
from windmill_api.api.my_tag import get_my_data_model
from windmill_api.types import Response

with client as client:
    my_data: MyDataModel = get_my_data_model.sync(client=client)
    # or if you need more info (e.g. status_code)
    response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client)

Or do the same thing with an async version:

from windmill_api.models import MyDataModel
from windmill_api.api.my_tag import get_my_data_model
from windmill_api.types import Response

async with client as client:
    my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
    response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)

By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.

client = AuthenticatedClient(
    base_url="https://internal_api.example.com", 
    token="SuperSecretToken",
    verify_ssl="/path/to/certificate_bundle.pem",
)

You can also disable certificate validation altogether, but beware that this is a security risk.

client = AuthenticatedClient(
    base_url="https://internal_api.example.com", 
    token="SuperSecretToken", 
    verify_ssl=False
)

Things to know:

  1. Every path/method combo becomes a Python module with four functions:

    1. sync: Blocking request that returns parsed data (if successful) or None
    2. sync_detailed: Blocking request that always returns a Request, optionally with parsed set if the request was successful.
    3. asyncio: Like sync but async instead of blocking
    4. asyncio_detailed: Like sync_detailed but async instead of blocking
  2. All path/query params, and bodies become method arguments.

  3. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)

  4. Any endpoint which did not have a tag will be in windmill_api.api.default

Advanced customizations

There are more settings on the generated Client class which let you control more runtime behavior, check out the docstring on that class for more info. You can also customize the underlying httpx.Client or httpx.AsyncClient (depending on your use-case):

from windmill_api import Client

def log_request(request):
    print(f"Request event hook: {request.method} {request.url} - Waiting for response")

def log_response(response):
    request = response.request
    print(f"Response event hook: {request.method} {request.url} - Status {response.status_code}")

client = Client(
    base_url="https://api.example.com",
    httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}},
)

# Or get the underlying httpx client to modify directly with client.get_httpx_client() or client.get_async_httpx_client()

You can even set the httpx client directly, but beware that this will override any existing settings (e.g., base_url):

import httpx
from windmill_api import Client

client = Client(
    base_url="https://api.example.com",
)
# Note that base_url needs to be re-set, as would any shared cookies, headers, etc.
client.set_httpx_client(httpx.Client(base_url="https://api.example.com", proxies="http://localhost:8030"))

Release files for windmill-api 1.815.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for windmill-api 1.815.0
File Size Uploaded
windmill_api-1.815.0.tar.gz 2.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for windmill-api 1.815.0
File Interpreter ABI Platform
windmill_api-1.815.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 MB

Release files / windmill_api-1.815.0.tar.gz

Download URL windmill_api-1.815.0.tar.gz
Size 2.7 MB
Tags Source
SHA-256 checksum
How to use checksums
f4ea770bf13bb4cf16558ebfe1735fc07a7c797c88de5d95d2257c3da66f00c1
BLAKE2b-256 checksum
How to use checksums
44478da584b27b34f662fdff89f78f87224ded1bd846aca2106dabf7d0f8ab00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.3 Linux/6.14.0-1017-azure

Release files / windmill_api-1.815.0-py3-none-any.whl

Download URL windmill_api-1.815.0-py3-none-any.whl
Size 8.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
50745892e60217124bec386c524d1a4116893098d60710bd729471ba72c70a12
BLAKE2b-256 checksum
How to use checksums
7053b41fc5a020de9907a1a97ebb0fecb6fe36d2b13d5e9b274bed2f45d8c365
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.3 Linux/6.14.0-1017-azure

Release history Release notifications | RSS feed

This release

1.815.0 This release

2 release files

1.434.1

1 release file

1.355.2

1 release file

1.349.1

1 release file

1.348.1

1 release file

1.348.0

1 release file

1.347.1

1 release file

1.99.0

2 release files

1.90.0

2 release files

1.89.0

2 release files

1.88.1

2 release files

1.88.0

2 release files

1.87.0

2 release files

1.84.1

2 release files

1.84.0

2 release files

1.83.1

2 release files

1.83.0

1 release file

1.82.0

2 release files

1.81.0

2 release files

1.80.1

2 release files

1.80.0

2 release files

1.79.0

2 release files

1.78.0

2 release files

1.77.0

2 release files

1.76.0

2 release files

1.75.0

2 release files

1.71.0

2 release files

1.70.1

2 release files

1.70.0

2 release files

1.69.2

2 release files

1.69.1

2 release files

1.69.0

2 release files

1.68.0

2 release files

1.67.4

2 release files

1.67.3

2 release files

1.67.2

2 release files

1.67.0

2 release files

1.66.1

2 release files

1.66.0

2 release files

1.65.0

2 release files

1.64.0

2 release files

1.63.2

2 release files

1.63.1

2 release files

1.61.1

2 release files

1.61.0

2 release files

1.60.0

2 release files

1.56.1

2 release files

1.56.0

2 release files

1.51.0

2 release files

1.50.0

2 release files

1.49.1

2 release files

1.49.0

2 release files

1.48.2

2 release files

1.48.1

2 release files

1.48.0

2 release files

1.47.3

2 release files

1.47.2

2 release files

1.47.1

2 release files

1.47.0

2 release files

1.46.2

2 release files

1.46.1

2 release files

1.42.1

2 release files

1.41.0

2 release files

1.40.1

2 release files

1.40.0

2 release files

1.39.0

2 release files

1.38.5

2 release files

1.38.4

2 release files

1.38.3

2 release files

1.38.1

2 release files

1.38.0

2 release files

1.34.0

2 release files

1.33.0

2 release files

1.32.0

2 release files

1.31.0

2 release files

1.30.0

2 release files

1.29.0

2 release files

1.26.2

2 release files

1.26.1

2 release files

1.26.0

2 release files

1.25.0

2 release files

1.24.2

2 release files

1.24.1

2 release files

1.24.0

2 release files

1.23.0

2 release files

1.22.0

2 release files

1.21.0

2 release files

1.19.3

2 release files

1.19.2

2 release files

1.19.1

2 release files

1.19.0

2 release files

1.18.0

2 release files

1.15.1

2 release files

1.15.0

2 release files

1.14.6

2 release files

1.14.5

2 release files

1.14.4

2 release files

1.14.3

2 release files

1.14.2

2 release files

1.14.0

2 release files

1.13.0

2 release files

1.12.0

2 release files

1.11.0

2 release files

1.10.1

2 release files

1.10.0

2 release files

1.8.6

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.1

2 release files

1.5.0

2 release files

1.4.2

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page