import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import CreateSourceRequest
from unstructured_client.models.shared import CreateSourceConnector
with UnstructuredClient(api_key_auth=os.getenv("UNSTRUCTURED_API_KEY")) as client:
response = client.sources.create_source(
request=CreateSourceRequest(
create_source_connector=CreateSourceConnector(
name="<name>",
type="confluence",
config={
"url": "<url>",
"max_num_of_spaces": <max-num-of-spaces>,
"max_num_of_docs_from_each_space": <max-num-of-docs-from-each-space>,
"spaces": ["<space-name>", "<space-name>"],
"extract_images": <True|False>,
"extract_files": <True|False>,
# For API token authentication:
# "username": "<username>",
# "token": "<api-token>",
# "cloud": <True|False>,
# For personal access token (PAT) authentication:
# "token": "<personal-access-token>",
# "cloud": False,
# For password authentication:
# "username": "<username>",
# "password": "<password>",
# "cloud": <True|False>
}
)
)
)
print(response.source_connector_information)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4