From 84560c5cb9e39b7a75d44bb65b896e0a18a94dcb Mon Sep 17 00:00:00 2001 From: Carrington Muleya <79579279+Carrington-dev@users.noreply.github.com> Date: Wed, 21 Jan 2026 23:35:49 +0200 Subject: [PATCH 1/2] Fix: Remove the overall error --- examples/flask/app.py | 22 ++++++++-------- examples/general/main.py | 56 ++++++++++++++++++++-------------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/examples/flask/app.py b/examples/flask/app.py index c64a84c..26369d6 100644 --- a/examples/flask/app.py +++ b/examples/flask/app.py @@ -1,16 +1,16 @@ -from flask import Flask -from dotzen import config +# from flask import Flask +# from dotzen import config -app = Flask(__name__) +# app = Flask(__name__) -SECRET_KEY = config("SECRET_KEY", default="key") +# SECRET_KEY = config("SECRET_KEY", default="key") -@app.route("/") -def get_home(): - return { - "secret-key": SECRET_KEY - } +# @app.route("/") +# def get_home(): +# return { +# "secret-key": SECRET_KEY +# } -if __name__ == "__main__": - app.run() \ No newline at end of file +# if __name__ == "__main__": +# app.run() \ No newline at end of file diff --git a/examples/general/main.py b/examples/general/main.py index 8617139..91065a9 100644 --- a/examples/general/main.py +++ b/examples/general/main.py @@ -1,34 +1,34 @@ -from dotzen import EncryptionManager -from dotzen.encryption import encrypt_for_env +# from dotzen import EncryptionManager +# from dotzen.encryption import encrypt_for_env -if __name__ == "__main__": - # Demo usage - print("=== DotZen Encryption Demo ===\n") +# if __name__ == "__main__": +# # Demo usage +# print("=== DotZen Encryption Demo ===\n") - # Base64 encryption - print("1. Base64 Encryption:") - original = "carrington" - encrypted = EncryptionManager.encrypt(original, 'base64') - decrypted = EncryptionManager.decrypt(encrypted, 'base64') - print(f"Original: {original}") - print(f"Encrypted: {encrypted}") - print(f"Decrypted: {decrypted}") - print() +# # Base64 encryption +# print("1. Base64 Encryption:") +# original = "carrington" +# encrypted = EncryptionManager.encrypt(original, 'base64') +# decrypted = EncryptionManager.decrypt(encrypted, 'base64') +# print(f"Original: {original}") +# print(f"Encrypted: {encrypted}") +# print(f"Decrypted: {decrypted}") +# print() - # MD5 hashing (one-way) - print("2. MD5 Hashing (one-way):") - hashed = EncryptionManager.encrypt("password123", 'md5') - print(f"Hashed: {hashed}") - print() +# # MD5 hashing (one-way) +# print("2. MD5 Hashing (one-way):") +# hashed = EncryptionManager.encrypt("password123", 'md5') +# print(f"Hashed: {hashed}") +# print() - # SHA256 hashing (one-way) - print("3. SHA256 Hashing (one-way):") - hashed = EncryptionManager.encrypt("password123", 'sha256') - print(f"Hashed: {hashed}") - print() +# # SHA256 hashing (one-way) +# print("3. SHA256 Hashing (one-way):") +# hashed = EncryptionManager.encrypt("password123", 'sha256') +# print(f"Hashed: {hashed}") +# print() - # Encrypt for .env file - print("4. Encrypt for .env file:") - env_value = encrypt_for_env("my-super-secret-api-key") - print(f"Add to .env: API_KEY={env_value}") \ No newline at end of file +# # Encrypt for .env file +# print("4. Encrypt for .env file:") +# env_value = encrypt_for_env("my-super-secret-api-key") +# print(f"Add to .env: API_KEY={env_value}") \ No newline at end of file From f735682a0284c267e723a15612b342852234b8a5 Mon Sep 17 00:00:00 2001 From: Carrington Muleya <79579279+Carrington-dev@users.noreply.github.com> Date: Wed, 21 Jan 2026 23:37:12 +0200 Subject: [PATCH 2/2] Update main.py --- examples/fastapi/main.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/fastapi/main.py b/examples/fastapi/main.py index d8297da..afe6fbd 100644 --- a/examples/fastapi/main.py +++ b/examples/fastapi/main.py @@ -1,12 +1,12 @@ -from fastapi import FastAPI -from dotzen import config +# from fastapi import FastAPI +# from dotzen import config -app = FastAPI() +# app = FastAPI() -SECRET_KEY = config("SECRET_KEY", default="key") +# SECRET_KEY = config("SECRET_KEY", default="key") -@app.get("/") -def get_home(): - return { - "secret-key": SECRET_KEY - } \ No newline at end of file +# @app.get("/") +# def get_home(): +# return { +# "secret-key": SECRET_KEY +# } \ No newline at end of file