edited environment and made it into a class
This commit is contained in:
parent
ea19abb95c
commit
3793721a7f
|
@ -1,10 +1,13 @@
|
||||||
import os
|
import os
|
||||||
import boto3
|
import boto3
|
||||||
from dotenv import load_dotenv
|
import environ
|
||||||
|
|
||||||
def initialize_s3_client():
|
def initialize_s3_client():
|
||||||
# Load environment variables from .env file
|
# Load environment variables from .env file
|
||||||
load_dotenv()
|
env_path = os.path.join('safeshare', 'env')
|
||||||
|
|
||||||
|
# Load environment variables from the .env file
|
||||||
|
environ.Env.read_env(env_path)
|
||||||
|
|
||||||
# Access AWS credentials
|
# Access AWS credentials
|
||||||
aws_key = os.getenv('AWS_ACCESS_KEY_ID')
|
aws_key = os.getenv('AWS_ACCESS_KEY_ID')
|
||||||
|
|
Loading…
Reference in New Issue