Skip to main content

Canvas langchain document loader

Features:

Indexes Dropbox Files

The following file types are supported: md htm html docx xls xlsx pptx pdf rtf txt

(doc support would require libreoffice, so has not been implemented in this library)

Running locally

You can do the install as described below, or build/run the provider dockerfile.

Docker

Edit dropbox-test.py, fill in the correct auth and one of folder_path, file_path, or file_paths.

Run (this also builds docker):

docker run -it $(docker build -q .)

Installation

Install dependencies:

pip install -r requirements.txt

Usage example:

To use a refresh token, pass in api_key along with api_secret

from dropbox_files import DropboxLoader

auth = {
	"access_token": "ACCESS_TOKEN_FROM_OAUTH",
	"refresh_token": "REFRESH_TOKEN",
	"expires_at": "EXPIRE_TIMESTAMP"
}

loader = DropboxLoader(
	auth = auth,
	folder_path = "/PATH_TO_FOLDER_OR_EMPTY_STRING",
	# file_path = "/PATH/TO_FILE/File.extension",
	# file_paths = [
	# 	"/PATH/TO_FILE/File 1.extension",
	# 	"/PATH/TO_FILE/File 2.extension"
	# ],
	# api_key = "API_KEY",
	# api_secret = "API_SECRET",
)

documents = loader.load()

print("\nDocuments:\n")
print(documents)

print("\nInvalid files:\n")
print(loader.invalid_files)
print("")

print("\nErrors:\n")
print(loader.errors)
print("")

If errors are present, loader.errors will contain one list element per error. It will consist of an error message (key named message) and if the error pertains to a folder issue, a key named folder, for files a file key. Right now the library only catches Dropbox API specific exceptions.

Metadata

Release files for dropbox-langchain 0.11.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 dropbox-langchain 0.11.0
File Size Uploaded
dropbox_langchain-0.11.0.tar.gz 18.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dropbox-langchain 0.11.0
File Interpreter ABI Platform
dropbox_langchain-0.11.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.6 kB

Release files / dropbox_langchain-0.11.0.tar.gz

Download URL dropbox_langchain-0.11.0.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a83b29a9bb9114e6db18f0f414ce19bd4e4bea25e99fd95e7ceb20f1dc7a756e
BLAKE2b-256 checksum
How to use checksums
37bd4420146ac7d87e8a77cbccbad2f866293dbf2f04a513adbef59e463b8c6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / dropbox_langchain-0.11.0-py3-none-any.whl

Download URL dropbox_langchain-0.11.0-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e45fb6c2dbe065cedff5a65fa1e75d0ea6a45d11c6d15335daa0ddd31a257dd
BLAKE2b-256 checksum
How to use checksums
225a295a301bb9cdc080f5570c1b7e54819e30673645c6227fc5eeb2b9d385b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.11.0 This release

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

1 release file

0.4

2 release files

0.3

2 release files

0.1

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