feat: 初始化工程
This commit is contained in:
18
config/rustfs.py
Normal file
18
config/rustfs.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
|
||||
import boto3
|
||||
from botocore.client import Config
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
access_key = 'Qc0pkBUAs5zEGgwWbYxr'
|
||||
secret_access = '9LQmdBYlagrCh5Iq0K1264UHRzfZ7VeFiDNGvsnb'
|
||||
|
||||
s3 = boto3.client('s3',
|
||||
endpoint_url=f'http://{os.getenv("RUSTFS_HOST")}:{os.getenv("RUSTFS_PORT")}',
|
||||
aws_access_key_id=access_key,
|
||||
aws_secret_access_key=secret_access,
|
||||
config=Config(signature_version='s3v4'),
|
||||
region_name='cn-east-1'
|
||||
)
|
||||
Reference in New Issue
Block a user