semvec/pypi-packages huggingface dataset:
gemini-pro-class-generator 1
This package contains implementation of an application to generate classes of any programming language, with Gemini Pro integrated into it.
License: MIT

# gemini-pro-class-generator

Even wondered about generating classes with their attributes and methods without manually writing hundreds of 
lines of code? **Gemini Pro Class Generator** is the tool to do so. This tool generates code for a class in a 
programming language of your choice based on the given specifications.

# Source Code

The source code of the application **Gemini Pro Class Generator** is available in 
[Source Code](https://github.com/GlobalCreativeApkDev/gemini-pro-class-generator/blob/master/main.py).

# Installation

```
pip install gemini-pro-class-generator
```

# How to Use the Application?

Pre-requisites:

1. [Python](https://www.python.org/downloads/) installed in your device.
2. .env file in the same directory as <GEMINI_PRO_CLASS_GENERATOR_DIRECTORY> and has the value of GEMINI_API_KEY.

First, open a Terminal or Command Prompt window and run the following command.

```
cd <GEMINI_PRO_CLASS_GENERATOR_DIRECTORY>
python3 main.py
```

**Note:** Replace <GEMINI_PRO_CLASS_GENERATOR_DIRECTORY> with the path to the directory of the application
**Gemini Pro Class Generator**.

Then, the application will start with something looking like in the screenshot below.

![Application](images/Application.png)

You will then be asked to input the following values.

1. Temperature - between 0 and 1 inclusive
2. Top P - between 0 and 1 inclusive
3. Top K - at least 1
4. Max output tokens - at least 1

The following screenshot shows what is displayed after inputting the mentioned values.

![Code Generator](images/Code%20Generator.png)

You will be required to input the following pieces of information.

1. The name of the programming language you want to create a class in.
2. The name of the class you want to create.
3. The number of attributes you want to include in the class.
4. Name and description of each class attribute.
5. The number of methods you want to include in the class.
6. Name and description of each class method.

Once you enter the values mentioned above, the file containing the code will be created inside "classes" directory.
Then, you will be asked whether you still want to continue unit testing or not. If you enter 'Y', 
you will be redirected to an application window like in screenshot above. Else, you will exit the application.

![Code Generator End](images/Code%20Generator%20End.png)

Below demonstrates how a class generated by the application looks like.

![Generated Class](images/Generated%20Class.png)