AI-Functions icon indicating copy to clipboard operation
AI-Functions copied to clipboard

Modularizes Python Files and Introduce .env File for Improved Security

Open AndresCdo opened this issue 2 years ago • 1 comments

Background

The Python files in the project are currently monolithic and can be difficult to manage and maintain. Additionally, sensitive information such as API keys are stored in a "keys.py" file, which can pose a security risk if accessed by unauthorized users. To address these issues, a pull request has been submitted that modularizes the Python files and introduces the use of a .env file for improved security.

Changes

  • Modularized Python files: The pull request modularizes the Python files in the project to improve their manageability and maintainability. Each file is broken down into smaller modules that focus on specific functionalities, making it easier to locate and modify specific code.

    1. Created a new directory ai and moved the ai_functions.py file into it. Renamed the file to functions.py to avoid redundancy in the name. Also, added an init.py file to make it a Python package.
    2. Created a new directory, tests and moved the test_ai_function.py file into it. Added an init.py file to make it a Python package.
  • Introduced .env file: The pull request introduces the use of a .env file to store sensitive information such as API keys. This provides an added layer of security by preventing unauthorized access to sensitive information.

  • Removed keys.py file: The pull request removes the "keys.py" file from the project since it's no longer needed. Instead, the sensitive information is stored securely in the .env file.

  • Added a .gitignore file to ignore certain files and directories that should not be tracked by the version control system, such as pycache directories, virtual environments, etc.

Documentation

The pull request updates the project's documentation to reflect the changes made to the Python files and the introduction of the .env file. This helps other developers understand how to use the new file structure and ensures that the project's documentation is accurate and up-to-date.

AndresCdo avatar Apr 22 '23 18:04 AndresCdo

@Torantulino if you this this PR is ok, I should create a new one with changes in README file.

AndresCdo avatar Apr 22 '23 19:04 AndresCdo