We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example script :
import os import dotenv DOTENV_FILE = os.path.join(os.path.dirname(__file__), ".env") def init_dotenv(): with open(DOTENV_FILE, "w") as fp: fp.write("TEST=ABCD") def print_dotenv(): with open(DOTENV_FILE) as fp: content = fp.read() print("-" * 30, "DOTENV", "-" * 30) print(content) print() init_dotenv() print_dotenv() dotenv.set_key(DOTENV_FILE, "FOO", "1234") print_dotenv()
Output
------------------------------ DOTENV ------------------------------ TEST=ABCD ------------------------------ DOTENV ------------------------------ TEST=ABCDFOO='1234'
Is this something you want to fix ?
The text was updated successfully, but these errors were encountered:
I don't think it can a bug, you can change your code same as the library to put '\n'
Sorry, something went wrong.
set_key
This is indeed a bug. I made a fix in #361. I hope that it will solve your issue.
Successfully merging a pull request may close this issue.
Example script :
Output
Is this something you want to fix ?
The text was updated successfully, but these errors were encountered: