marouane53 / transcribe

MIT License
162 stars 75 forks source link

feat: Implement .env File Usage for API Key Configuration #5

Closed Marouan-chak closed 7 months ago

Marouan-chak commented 8 months ago

Summary

This PR introduces the use of a .env file for securely managing API keys and other sensitive information required by the transcription tool. By shifting from hard-coded API keys in the source code to a more secure, external configuration approach, we enhance both the security and flexibility of the application.

Changes

Documentation Update: The README now contains instructions for creating and configuring a .env file, based on the provided .env.example template. Code Modification: Adjusted the script to load API keys from environment variables set through the .env file, using the python-dotenv package for loading these variables.

Benefits

Security: Prevents sensitive API keys from being hard-coded into the source code, reducing the risk of accidental exposure. Convenience: Simplifies configuration management, allowing users to easily update their settings without modifying the code. Best Practices: Aligns with industry best practices for handling sensitive configuration data.