semvec/pypi-packages huggingface dataset:
gemini-model-rotater 1.0.1
A package to rotate Gemini API models based on rate limits.
Requires Python: >=3.6

# Gemini Model Rotater

`gemini-model-rotater` is a Python package that rotates Gemini API models based on their rate limits. It loads model configurations from a JSON file and selects the best available model based on remaining quota. It also includes methods to increment usage after a request and swap models when rate limits are exceeded. The ranking of models determines the order in which they are selected. The package is useful for managing multiple models with different rate limits and selecting the best model for each request.

## Installation

You can install the package via pip with the following command:


```bash
pip install gemini-model-rotater==1.0.0
```

## Usage

```python
from gemini_model_rotater import ModelManager

# Initialize with the JSON file containing your model configurations.
manager = ModelManager("models.json")

# Get the best available model.
model = manager.get_available_model()
if model:
    print("Using model:", model.name)
    # Perform your API call here.
    manager.increment_request(model.name)
else:
    print("No models available. Please wait for limits to reset.")

# If a 429 error occurs, swap to an alternative model.
alternative_model = manager.swap_model(model.name)
if alternative_model:
    print("Swapped to model:", alternative_model.name)
else:
    print("No alternative models available.")
```

## Json File Format

```json
[
  {
    "name": "model_A",
    "requests_per_minute": 10,
    "requests_per_day": 100,
    "ranking": 1
  },
  {
    "name": "model_B",
    "requests_per_minute": 5,
    "requests_per_day": 50,
    "ranking": 2
  }
]

```


### 3. LICENSE



```text
MIT License

Copyright (c) 2025 Santosh Kanumuri

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
zetta 0.0.114
Python client library for ZettaBlock AI Network
Requires Python: >=3.9
Keywords: zettablock, client, cloud, AI, blockchain, infrastructure

Python client for ZettaBlock AI Network.


# Development
## Setup
### Install locally
1. Clone the repository.
2. Create a virtual environment and install the package.
```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
```
### GRPC
The client import zetta-grpc-protos as an external repo, you will need to provide your github username and password to install
```bash
# using below command to store and skip the repeatly input username / password
git config credential.helper store
```
For two phase authentication enabled account, password is private-access-token.

### IDE setup
for PyCharm, you will need to run 
```bash
pip install -e . 
```
to recognize the GRPC imported library correctly

### Run the Client
Try run the client.
```sh
zetta --help
```

## CICD
1. the cicd is integrated with python 3.8 to 3.12 and on Ubuntu, MacOS and windows. make sure your PR passed all checks on all environment
2. make sure some tests are added in the folder, cicd will run checks and test automatically
3. if all tests passes, the version will be automatically boost and submit a newer version to PyPi
4. If you want to include the comment in CHANGELOG.md, in Pull request, add ##Changelog in the comment
PhotonEngine 0.0.6.dev0
A  game engine written in Python

# Photon

Photon is a game engine written in Python just for fun.

## Installation

### Requirements

* **Python >=3.10**

   The engine is based on [Python 3.10](https://www.python.org/downloads/release/python-31012).

   It is preferred that you use Python 3.10 or upgrade to a version supported by [PyImGUI](https://github.com/pyimgui/pyimgui).

### Installation Methods

You can install Photon using pip or by compiling from source ([GitHub](https://github.com/ArnavChoudhary9/Photon)) or download [precompiled binaries](https://github.com/ArnavChoudhary9/Photon/releases)

#### 1. Install via pip

This is the recommended method for most users.

```sh
pip install PhotonEngine
```

* **Dependency**: Python

#### 2. Compile from Source (GitHub)

Use this method if you want to contribute to Photon's development or explore its inner workings.

* **Requirement**: Virtual Environment (venv)

   Install using:

   ```sh
   pip install venv
   ```

1. Clone the repository:

   ```sh
   git clone --recursive https://github.com/ArnavChoudhary9/Photon
   ```

2. Navigate to the project directory:

   ```sh
   cd Photon
   ```

3. Initialize the repository:

   ```sh
   setup.bat
   ```

4. Activate the virtual environment:

   ```sh
   venv\Scripts\activate
   ```

5. Run Forge Editor:

   ```sh
   cd Forge
   python Forge.py
   ```

> Congratulations! You have successfully run Forge Editor.

#### 3. Running Precompiled binaries

Use this if you only want to run the editor and develope games.

Download the latest precompiled binary from [GitHub](https://github.com/ArnavChoudhary9/Photon/releases).

To run the editor, navigate to the downloaded directory and run `Forge.exe`.

## Inspiration

Photon draws a lot of inspiration from [Hazel](https://github.com/TheCherno/Hazel) and takes a lot of learning from [The Cherno](https://youtube.com/playlist?list=PLlrATfBNZ98dC-V-N3m0Go4deliWHPFwT&si=joZeeB9E0mV37S28).

* Find [Documentation here](https://arnavchoudhary9.github.io/Photon/docs/book)
* Visit the [DevLog site here](https://arnavchoudhary9.github.io/Photon/devlogs/book)