semvec/pypi-packages huggingface dataset:
gemseo-benchmark 4.0.1
A GEMSEO-based package to benchmark optimization algorithms.
Requires Python: <3.14,>=3.10

<!--
Copyright 2021 IRT Saint Exupéry, https://www.irt-saintexupery.com

This work is licensed under the Creative Commons Attribution-ShareAlike 4.0
International License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative
Commons, PO Box 1866, Mountain View, CA 94042, USA.
-->

# gemseo-benchmark

[![PyPI - License](https://img.shields.io/pypi/l/gemseo-benchmark)](https://www.gnu.org/licenses/lgpl-3.0.en.html)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gemseo-benchmark)](https://pypi.org/project/gemseo-benchmark/)
[![PyPI](https://img.shields.io/pypi/v/gemseo-benchmark)](https://pypi.org/project/gemseo-benchmark/)
[![Codecov branch](https://img.shields.io/codecov/c/gitlab/gemseo:dev/gemseo-benchmark/develop)](https://app.codecov.io/gl/gemseo:dev/gemseo-benchmark)

## Overview

A GEMSEO-based package to benchmark optimization algorithms.

## Installation

Install the latest version with `pip install gemseo-benchmark`.

See [pip](https://pip.pypa.io/en/stable/getting-started/) for more information.

## Bugs and questions

Please use the [gitlab issue tracker](https://gitlab.com/gemseo/dev/gemseo-benchmark/-/issues)
to submit bugs or questions.

## Contributing

See the [contributing section of GEMSEO](https://gemseo.readthedocs.io/en/stable/software/developing.html#dev).

## Contributors

- Benoit Pauwels
- Antoine Dechaume
openrelik-api-client 0.5.0
API client that automatically handles token refresh
Requires Python: <4.0,>=3.10

## OpenRelik API Client

This Python package provides a simple API client (`APIClient`) that automatically handles token refresh on 401 (Unauthorized) responses.

* **Automatic token refresh:** Seamlessly refreshes expired access tokens using a refresh token.
* **Easy-to-use interface:** Simple methods for common HTTP requests (GET, POST, PUT, DELETE).
* **Customizable:**  Allows you to specify the API server URL, API key, and API version.

## Installation

   ```bash
   pip install openrelik-api-client
   ```

**Example:**
   ```python
    import os
    from openrelik_api_client.api_client import APIClient

    # Initialize the API client
    api_server_url = "http://localhost:8710"

    # API key from environment variable
    api_key = os.getenv("OPENRELIK_API_KEY")

    # Create the API client. It will handle token refreshes automatically.
    api_client = APIClient(api_server_url, api_key)

    # Example GET request
    response = api_client.get("/users/me/")
    print(response.json())
```


**How it works:**

The `APIClient` utilizes a custom session class (`TokenRefreshSession`) that intercepts requests and checks for 401 responses. If a 401 response is encountered, it automatically attempts to refresh the access token using the provided refresh token. If the refresh is successful, the original request is retried with the new access token.

##### Obligatory Fine Print
This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.