Python-gemini-api

Latest version: v2.4.12

Safety actively analyzes 682487 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 5

1.0.1

fix: now cookie refresh task can be correctly canceled on init

**Full Changelog**: https://github.com/HanaokaYuzu/Gemini-API/compare/v1.0.0...v1.0.1

1.0.0

<img src="https://www.gstatic.com/lamda/images/favicon_v1_150160cddff7f294ce30.svg" width="35px" alt="Gemini Icon" /> Gemini API - v1.x.x
Development Status :: 1 - Planning

In February 2024, Bard underwent a rebranding and is now known as Gemini. The [Bard API](https://github.com/dsdanielpark/Bard-API) has transitioned to the [Gemini API](https://github.com/dsdanielpark/Gemini-API).

Going forward, only major version updates will be documented in the release notes. For other minor patches, please refer to the latest PyPI files.

$ pip install python-gemini-api


$ pip install -q -U python-gemini-api


python
from gemini import Gemini

cookies = {
"key": "value"
}

GeminiClient = Gemini(cookies=cookies)

GeminiClient = Gemini(cookie_fp="folder/cookie_file.json") Or use cookie file path
GeminiClient = Gemini(auto_cookies=True) Or use auto_cookies paprameter

Before proceeding, ensure that the GeminiClient object is defined without any errors.

prompt = "Hello, Gemini. What's the weather like in Seoul today?"
response = GeminiClient.generate_content(prompt)
print(response)

**Full Changelog**: https://github.com/dsdanielpark/Gemini-API/commits/1.0.0

Release Note
- Development is ongoing. Stay tuned. (Some features work, but it's incomplete.)
- Use a Chrome extension to fetch cookie values, as some cookies are not yet specified.
- Still working on **parsing the response text**.
- Only part of the text generation feature works.
- Developing logic to automatically refresh cookie values, see auto_cookies for details.

0.6.1

0.6.0

0.5.2

0.5.1

Page 3 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.