semvec/pypi-packages huggingface dataset:
senhasegura 0.1.3
 An unofficial module for integrating with SenhaSegura APIs, supporting OAuth1 and OAuth2 authentication. It offers a simple interface for making HTTP requests while ensuring hostname and endpoint validation. Ideal for developers looking to implement password management functionalities securely.
License: MIT
Requires Python: <4.0,>=3.8
Keywords: senhasegura, api, integration, a2a

# SenhaSegura
## Overview

The A2A module provides an unofficial interface for interacting with the SenhaSegura APIs. This module simplifies the integration of password management functionalities into your applications by offering support for both OAuth1 and OAuth2 authentication methods.
## Features
**Support for HTTP Methods**: Easily make GET, POST, PUT, DELETE, HEAD, OPTIONS, and PATCH requests.
**Hostname Validation**: Ensures that the provided hostname follows standard DNS rules.
**Endpoint Validation**: Validates endpoint strings to prevent malformed URLs.
Dynamic Method Binding: All HTTP methods are dynamically bound, allowing for intuitive usage.
**OAuth Authentication**: Supports **OAuth1** and **OAuth2** for secure API access.
**Error Handling**: Comprehensive error handling for authentication and request parameters.

## Installation

You can use the SenhaSegura using one of the following methods:

pip:
```pip install senhasegura```
Git:
```git clone https://github.com/SrRenks/senhasegura.git```

## Usage

**Initialize the A2A Class**: To create an instance of the A2A module, specify the hostname and authentication parameters:
```
from senhasegura import A2A
import json
with open("oauth1_params.json", "r") as file:
    oauth1_params = json.loads(file.read())
a2a = A2A("senhasegura.yourcompany.com", "OAuth1", **oauth1_params)
```
**Make API Calls**: Use the instance to call API endpoints with the desired HTTP method:
```
response = a2a.get("/iso/coe/senha", params={"123": 123}, headers={"User-Agent": "example"})
```
**Handle the Response**: You can process the requests.Response as needed:
```
print(response.json())
```

## Example

Here's a complete example of using the A2A module:
```
from senhasegura import A2A
import json

# Load OAuth1 parameters from a JSON file
with open("oauth1_params.json", "r") as file:
    oauth1_params = json.loads(file.read())

# Initialize with your credentials
a2a = A2A("senhasegura.yourcompany.com", "OAuth1", **oauth1_params)

# Make a GET request
response = a2a.get("/iso/coe/senha", params={"123": 123}, headers={"User-Agent": "example"})

# Print the response
print(response.json())
```
## Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or features you would like to see.

## License
This project is licensed under the MIT License. See the LICENSE file for details.
langchain-s3-cached-embeddings 0.8.3
langchain embeddings wrapper to persist embeddings for re-use later
License: MIT
Requires Python: >=3.11

# langchain-s3-cached-embeddings

Proxies _**any**_ langchain `Embeddings` class such as `OpenAIEmbeddings`, `GoogleGenerativeAIEmbeddings`, persisting all generated embeddings to S3. This allows subsequent calls to _optionally_ leverage the cached embeddings, avoiding additional and unecessary cost of re-embedding. 
## Install

```bash
pip install langchain-s3-cached-embeddings
```

## Usage

```python
from langchain_s3_text_loaders import S3DirectoryLoader

   embeddings = S3EmbeddingsConduit(
        embeddings=OpenAIEmbeddings(model=model), # required
        bucket="my-embeddings-bucket", # required
        prefix="my-optional-prefix"
    )

```

## Advanced Usage

```python
   embeddings = S3EmbeddingsConduit(
        embeddings=OpenAIEmbeddings(model=model), # required
        bucket="my-embeddings-bucket", # required
        prefix="my-optional-prefix"
        filenaming_function: Optional[Callable[[str, int], str]] = None,
        cache_behavior = CacheBehavior.NO_CACHE):

```

## Usage Options

- `embeddings` - (required) any class implementing `langchain_core.embeddings.Embeddings`
- `bucket` - (required) the s3 bucket name
- `prefix` - (required) the s3 key name
- `filenaming_function` - (optional) redeives two arguments, 1. the file contents (`str`), 2. the index (`int`) e.g. `9` for the `10`the document and returns the filename ()`str`)
- `cache_behavior` - (optional) 
    - `CacheBehavior.NO_CACHE` - do not use cached embeddings, instead embed using the `embeddings` class' standard `embed_documents(...)` method
    - `CacheBehavior.ONLY_CACHE` - use cached embeddings. if the embeddings are no present, it raises an exception

## License
MIT