Skip to main content

The python package that returns Response of Google Gemini through Cookies.

Project description

Gemini Icon GeminiKit

An unofficial Python wrapper, geminikit, has been developed through reverse-engineering. This tool utilizes cookie values to interact with Google Gemini for testing purposes.


Installation

pip install -U geminikit

or

pip install git+https://github.com/rekcah-pavi/geminikit

Log Cookies

video guide
Watch the video

1. Close All Tabs

Ensure all tabs are closed in Google Chrome.

2. Access Network Export

  • Open a new tab and navigate to chrome://net-export/.

3. Configure Logging Settings

  • Check the box labeled Include cookies and credentials.
  • Set the Maximum log size to 1 MB.
  • Click the Start logging button.

4. Perform Actions

  • Open a new tab and go to gemini.google.com.
  • Log in to your Gemini account.
  • Send a sample message and wait for Gemini's response.

5. Stop Logging

  • Return to the logging tab and click the Stop logging button.

6. Retrieve Cookies

  • The cookies will be saved in a JSON file.

7. Get cookies from your saved file

from geminikit import get_cookies_from_file

with open("chrome-net-export-log.json",'r') as f:
	cookies = get_cookies_from_file(f.read())

print(cookies)

Usage

Setup gemini

from geminikit import Gemini
gemini = Gemini(cookies)

Ask a message

res = gemini.ask("hello")
print(res['text'])

Text to Voice

res = gemini.speech("hello")
with open("a.wav","wb") as f:
	f.write(res)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geminikit-1.1.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

geminikit-1.1.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file geminikit-1.1.1.tar.gz.

File metadata

  • Download URL: geminikit-1.1.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for geminikit-1.1.1.tar.gz
Algorithm Hash digest
SHA256 831292e3744a5b6ea259fbd4abc13d05945cd7357f441440d234ac65bd4e20ec
MD5 b83c7a9e8c7cce6cab96924b7bb6a641
BLAKE2b-256 2cae11cb27c2645c2ba00ac15da52af8bf2bd732d25b51ce71d2b3733cf20a5f

See more details on using hashes here.

File details

Details for the file geminikit-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: geminikit-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for geminikit-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e41421b43f45a534c8b06e06cc4b70b4ade5cc5b89e220f8c366f6221b6c05ee
MD5 4b8127dd065af538f45b25e948263e02
BLAKE2b-256 bb52c0bc2788e319f7cf3a9d62a9046674410fcc9c60cbab181af2a98e97c7f3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page