# OBSDirectoryLoader

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/obs_directory/OBSDirectoryLoader)

Load from `Huawei OBS directory`.

## Signature

```python
OBSDirectoryLoader(
    self,
    bucket: str,
    endpoint: str,
    config: Optional[dict] = None,
    prefix: str = '',
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `bucket` | `str` | Yes | The name of the OBS bucket to be used. |
| `endpoint` | `str` | Yes | The endpoint URL of your OBS bucket. |
| `config` | `dict` | No | The parameters for connecting to OBS, provided as a dictionary. The dictionary could have the following keys: - "ak" (str, optional): Your OBS access key (required if `get_token_from_ecs` is False and bucket policy is not public read). - "sk" (str, optional): Your OBS secret key (required if `get_token_from_ecs` is False and bucket policy is not public read). - "token" (str, optional): Your security token (required if using temporary credentials). - "get_token_from_ecs" (bool, optional): Whether to retrieve the security token from ECS. Defaults to False if not provided. If set to True, `ak`, `sk`, and `token` will be ignored. (default: `None`) |
| `prefix` | `str` | No | The prefix to be added to the OBS key. Defaults to "". (default: `''`) |

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    bucket: str,
    endpoint: str,
    config: Optional[dict] = None,
    prefix: str = '',
)
```

| Name | Type |
|------|------|
| `bucket` | `str` |
| `endpoint` | `str` |
| `config` | `Optional[dict]` |
| `prefix` | `str` |


## Properties

- `client`
- `bucket`
- `prefix`

## Methods

- [`load()`](https://reference.langchain.com/python/langchain-community/document_loaders/obs_directory/OBSDirectoryLoader/load)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/document_loaders/obs_directory.py#L10)