# Module document_loader (0.3.1)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.3.1 (latest)](https://docs.cloud.google.com/python/docs/reference/langchain-google-datastore/latest/langchain_google_datastore.document_loader)
- [0.3.0](https://docs.cloud.google.com/python/docs/reference/langchain-google-datastore/0.3.0/langchain_google_datastore.document_loader)
- [0.2.0](https://docs.cloud.google.com/python/docs/reference/langchain-google-datastore/0.2.0/langchain_google_datastore.document_loader)
API documentation for `document_loader` module.

## Classes

### [DatastoreLoader](https://docs.cloud.google.com/python/docs/reference/langchain-google-datastore/latest/langchain_google_datastore.document_loader.DatastoreLoader)

    DatastoreLoader(
        source: Union[Query, str],
        page_content_properties: List[str] = [],
        metadata_properties: List[str] = [],
        client: Optional[Client] = None,
    )

Document Loader for Google Cloud Firestore in Datastore Mode.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `source` | `Query or str` The source to load the documents. It can be an instance of Query or the name of the Datastore kind to read from. |
| `page_content_properties` | `list of str` The properties to write into the `page_content`. If an empty or None list is provided, all fields will be written into `page_content`. When only one field is provided, only the value is written. |
| `metadata_properties` | `list of str` The properties to write into the `metadata`. By default, it will write all fields that are not in `page_content` into `metadata`. |
| `client` | `DatastoreClient` Client for interacting with the Google Cloud Datastore API. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `list of dict` | Returns a list of documents with their content structured as specified by `page_content_properties` and `metadata_properties`. |

### [DatastoreSaver](https://docs.cloud.google.com/python/docs/reference/langchain-google-datastore/latest/langchain_google_datastore.document_loader.DatastoreSaver)

    DatastoreSaver(kind: Optional[str] = None, client: Optional[Client] = None)

Write into Google Cloud Platform `Firestore` in Datastore Mode.