Bardapi

Latest version: v1.0.0

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

Scan your dependencies

Page 6 of 7

0.1.10

I confirmed an error due to variable name pollution during the process of automatically finding tokens in the [googletrans ](https://github.com/ssut/py-googletrans)package, which I tried to use to **support various languages**. Therefore, I will keep version 0.1.9 as a development version and revert back to version 0.1.8. For those considering support for various languages, please refer to version 0.1.9.

Version 0.1.10 is the same as version 0.1.8.

0.1.9

Support for multiple languages.

Google Bard currently only supports English, Japanese, and Korean languages for its services. However, I have made adjustments to enable the usage of Google Bard in other languages as well by utilizing python package [googletrans](https://github.com/ssut/py-googletrans)

To achieve this, I have added an additional step to the process. When a language is specified as an argument, it will be first translated into English using Google Translate. Then, the response in English will be translated back into the user's specified language.

This modification allows users to use Google Bard in languages other than English, Japanese, and Korean.


Other languages
To detect and translate using the Google Bard in unofficial languages, the Python package [googletrans](https://github.com/ssut/py-googletrans) is utilized.

python
from bardapi import Bard
token = 'xxxxxxx'
bard = Bard(token=token, language='arabic')
res = bard.get_answer("هل تعرف الكيمتشي")

0.1.8

0.1.5

- The token parameter has been added as an argument to the Bard class, allowing you to provide the token directly instead of using the _BARD_API_KEY environment variable.
- The default timeout has been increased to 30 seconds. If you need to adjust the timeout duration, you can specify the timeout argument in seconds when initializing the Bard class.
- Improved exception handling to provide more explicit error messages for known issues.
- Code refactoring for improved efficiency. The code has been optimized slightly for better performance.

Please refer to the [Colab notebook](https://colab.research.google.com/drive/1zzzlTIh0kt2MdjLzvXRby1rWbHzmog8t?usp=sharing) or the official GitHub readme for more information.

0.1.4

The development status is raised to 5. **Production/Stable**
- Improving by passing session object as an argument
- As a result of user feedback based on the use of the code, it is determined that the package is somewhat stable, so the development status is raised to 5.
- From now on, package pull requests can only be done in response to debugging or Google API interface changes or Google policy changes.

0.1.3

- Fixed response errors due to server delays caused by various development environments. Set the timeout argument to the Bard class long enough in seconds.
- The argument has been modified to work behind a proxy. Enter the proxy information to be changed in the proxy argument of the Bard class.

Page 6 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.