semvec/pypi-packages huggingface dataset:
dropbox-langchain 0.11.0
A Dropbox langchain integration
Requires Python: >=3.8.1

# 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):

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

## Installation

Install dependencies:

```bash
pip install -r requirements.txt
```

## Usage example:

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

```python
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.
saola-graphql-client 0.0.8
A Python client for Saola's GraphQL API
Requires Python: >=3.9

# Saola GraphQL API client

This is a GraphQL client for Python based on the `ariadne-codegen` pip package. It is used to access the API at [app.saola.sg](https://app.saola.sg).

The client provides a convenient way to interact with the Saola GraphQL API, allowing you to perform various queries and mutations related to users, connections, workspaces, chats, and sources.

To add more queries and mutations, you can create new files with the `.graphql` extension in the `saola_graphql_client/graphql` directory. Once you have added your new GraphQL files, run the `./saola_graphql_client/run-codegen.sh` script to generate the necessary client code.

### Installation

```bash
pip install saola-graphql-client
```

### Usage

To use the client, you can import the generated client class and use it to perform queries and mutations. Here is an example:

```python
import asyncio
import jwt
from saola_graphql_client.graphql_client import Client as SaolaGraphQLClient

access_token = "your_access_token"
jwt_payload = jwt.decode(access_token, options={"verify_signature": False})
user_id = jwt_payload.get("hasura", {}).get("x-hasura-user-id")

client = SaolaGraphQLClient(
    url="https://app.saola.sg/v1/graphql",
    headers={"Authorization": f"Bearer {access_token}"},
)


async def get_and_print_current_user(client, user_id):
    current_user = await client.get_user(id=user_id)
    print(current_user)


asyncio.run(get_and_print_current_user(client, user_id))
```

Check `examples/` for more examples.


### Available methods

Check [saola_graphql_client/graphql_client/client.py](saola_graphql_client/graphql_client/client.py) for the available methods.