semvec/pypi-packages huggingface dataset:
pdf-image-retrieval 0.1.1
Extracts images from PDFs, stores them in S3, and retrieves based on keyword search
Requires Python: >=3.6

# PDF Image Retrieval

## Overview
This Python package extracts images from PDFs, stores them in AWS S3, and retrieves relevant images based on keyword extraction.

## Features
- Extract images from PDFs automatically
- Upload images to AWS S3 for storage
- Extract keywords from PDFs using NLP
- Train on PDFs to improve retrieval accuracy
- Search and retrieve images based on keywords
- Open-source & developer-friendly

## Installation
Install the package from PyPI:
```python
pip install pdf-image-retrieval
```
Or install directly from GitHub:
```python
pip install git+https://github.com/aryadhandhukiya/pdf-image-retrieval.git
```
## Usage
Extracting Images from a PDF and Storing in S3
```python
from pdf_image_retrieval import PdfImageExtractor

# Initialize extractor
extractor = PdfImageExtractor(pdf_path="sample.pdf", s3_bucket="my-bucket")

# Extract images and store them in S3
extractor.extract_and_upload()
```

Retrieving Relevant Images Based on a Query
```python
from pdf_image_retrieval import PdfImageRetriever

# Initialize retriever
retriever = PdfImageRetriever(s3_bucket="my-bucket")

# Search for images based on keywords
images = retriever.search_images("machine learning diagram")

# Print retrieved image URLs
for img in images:
    print(img)
```

## Configuration
Set up AWS credentials via environment variables:
```python
export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
export AWS_REGION="your-region"
```

## Contributing
We welcome contributions! Here's how you can help:

1. Fork the repo and create a new branch.

2. Make your changes and commit them.

3. Open a pull request with a description of your changes.

To set up for development:
```python
git clone https://github.com/aryandhandhukiya/pdf-image-retrieval.git
cd pdf-image-retrieval
pip install -r requirements.txt
```
pytest-iam 0.2.5
A fully functional OAUTH2 / OpenID Connect (OIDC) / SCIM server to be used in your testsuite
Requires Python: >=3.10
Keywords: iam, identity, oauth, oauth2, oidc, openid, pytest, scim, unit tests

pytest-iam
==========

pytest-iam spawns a lightweight OAuth2 / OpenID Server (OIDC) / SCIM in a thread to be used in your test suite.
The machinery involves [Canaille](https://canaille.readthedocs.io) and [Authlib](https://authlib.org).

- [Repository](https://github.com/pytest-dev/pytest-iam)
- [Package](https://pypi.org/project/pytest-iam)
- [Documentation](https://pytest-iam.readthedocs.io)

Installation
------------

```console
uv add pytest-iam
```

Usage
-----

pytest-iam provides tools to test your application authentication mechanism against a OAuth2/OIDC server, with SCIM support:

- It launches a [Canaille](https://canaille.readthedocs.io) instance on a random port;
- It provides a ``iam_server`` fixture that comes with several features:
    - the URL of the IAM server to configure your application
    - IAM models (Users, groups, clients, tokens etc.) to prepare your tests and check the side effects.
      More details on [the reference](https://pytest-iam.readthedocs.io/en/latest/reference.html)
    - utilities to log-in users and give their consent to your application
    - utilities to generate random users and groups

To run a full authentication process for a client application in your test,
you can write something like this:

```python
def test_authentication(iam_server, test_client):
    # create a random user on the IAM server
    user = iam_server.random_user()

    # log the user in and make it consent all the clients
    iam_server.login(user)
    iam_server.consent(user)

    # 1. attempt to access a protected page, returns a redirection to the IAM
    res = test_client.get("/protected")

    # 2. authorization code request
    res = iam_server.test_client.get(res.location)

    # 3. load your application authorization endpoint
    res = test_client.get(res.location)

    # 4. now you have access to the protected page
    res = test_client.get("/protected")

    assert "Hello, world!" in res.text
```

Check the [client application](https://pytest-iam.readthedocs.io/en/latest/client-applications.html) or
[resource server](https://pytest-iam.readthedocs.io/en/latest/resource-servers.html) tutorials
for more usecases.
invoker-guard 0.3.0
A simple, transport-agnostic wrapper for retrying callables.
Requires Python: >=3.8

# Invoker Guard

A simple, transport-agnostic wrapper for executing callables with robust, configurable retry logic, powered by `tenacity`.

It allows you to write your retry and validation logic once and apply it to different HTTP libraries like `requests`, `httpx`, and `niquests`.

## Installation

Install the core library:
```bash
pip install invoker-guard
```

Then, install the support for the HTTP library you want to use:
```bash
# For requests support
pip install invoker-guard[requests]

# For httpx support
pip install invoker-guard[httpx]

# For everything
pip install invoker-guard[requests,httpx,niquests]
```

## How to Use

The library's main function is `invoke`. You provide it with:
1.  A `callable_action` (a `lambda` that calls your HTTP library).
2.  A `RetryConfig` object defining your rules.
3.  A `Transport` object that matches your library.

### Example with `requests`

```python
import requests
from invoker_guard import invoke, RetryConfig, RetryError, REQUESTS_TRANSPORT

# Define rules
config = RetryConfig(expected_status_codes=[200])

# Define action
url = "https://api.example.com/data"
action = lambda: requests.get(url, timeout=10)

# Invoke it
try:
    response = invoke(action, config, transport=REQUESTS_TRANSPORT)
    print("Success:", response.json())
except RetryError as e:
    print("Failed after all retries:", e)
```

### Example with `httpx`

The logic is identical—just swap the library and the transport object.

```python
import httpx
from invoker_guard import invoke, RetryConfig, RetryError, HTTPX_TRANSPORT

# Define rules (can be the same config object)
config = RetryConfig(expected_status_codes=[200], required_json_keys=["id"])

# Define action for httpx
url = "https://api.example.com/data"
action = lambda: httpx.get(url, timeout=10)

# Invoke it
try:
    response = invoke(action, config, transport=HTTPX_TRANSPORT)
    print("Success:", response.json())
except RetryError as e:
    print("Failed after all retries:", e)
```
oxl-libnftables 1.0.2.post1
Copy of the python3-nftables module used to interact with libnftables
Requires Python: >=3

# NFTables 

This is a copy of the [python3-nftables module](http://git.netfilter.org/nftables/commit/?id=e760d200a4b9cd31928b68a1f2f882157344351e) (_apt-package version 1.0.2-1ubuntu3_) that is used to interact with [libnftables](https://www.mankier.com/5/libnftables-json).

The repository is used to serve it using [PyPI](https://pypi.org/project/oxl-libnftables/). 

Only minor changes were made to fix linting errors!

## Documentation

* [libnftables](https://www.mankier.com/5/libnftables-json)
* [NFTables](https://wiki.nftables.org/wiki-nftables/index.php/Quick_reference-nftables_in_10_minutes)