# hub_requests

Python API: `hubai_sdk.utils.hub_requests`

## Classes

### Request

#### Methods

##### delete

```python
def delete(service: HubService, endpoint: str = '', **kwargs) -> Any:
```

Send an authenticated DELETE request to HubAI.

##### get

```python
def get(service: HubService, endpoint: str = '', **kwargs) -> Any:
```

Send an authenticated GET request to HubAI.

##### headers

```python
def headers() -> dict[str, str]:
```

Build authenticated request headers for HubAI API calls.

Returns

 * `dict[str, str]`: Headers containing the bearer token and JSON accept header.

Raises

 * `ValueError`: If
   [HUBAI_API_KEY](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/environ.md) is not
   configured.

##### patch

```python
def patch(service: HubService, endpoint: str = '', **kwargs) -> Any:
```

Send an authenticated PATCH request to HubAI.

##### post

```python
def post(service: HubService, endpoint: str = '', **kwargs) -> Any:
```

Send an authenticated POST request to HubAI.

##### put

```python
def put(service: HubService, endpoint: str = '', **kwargs) -> Any:
```

Send an authenticated PUT request to HubAI.

##### url

```python
def url(service: HubService) -> str:
```

Build the API base URL for a HubAI service.
