megfile 3.0.3__py3-none-any.whl → 3.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- megfile/s3_path.py +13 -8
- megfile/version.py +1 -1
- {megfile-3.0.3.dist-info → megfile-3.0.4.dist-info}/METADATA +3 -3
- {megfile-3.0.3.dist-info → megfile-3.0.4.dist-info}/RECORD +9 -9
- {megfile-3.0.3.dist-info → megfile-3.0.4.dist-info}/LICENSE +0 -0
- {megfile-3.0.3.dist-info → megfile-3.0.4.dist-info}/LICENSE.pyre +0 -0
- {megfile-3.0.3.dist-info → megfile-3.0.4.dist-info}/WHEEL +0 -0
- {megfile-3.0.3.dist-info → megfile-3.0.4.dist-info}/entry_points.txt +0 -0
- {megfile-3.0.3.dist-info → megfile-3.0.4.dist-info}/top_level.txt +0 -0
megfile/s3_path.py
CHANGED
|
@@ -138,15 +138,20 @@ def get_endpoint_url(profile_name: Optional[str] = None) -> str:
|
|
|
138
138
|
|
|
139
139
|
:returns: S3 endpoint url
|
|
140
140
|
'''
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
if profile_name:
|
|
142
|
+
environ_keys = (f'{profile_name}__OSS_ENDPOINT'.upper(),)
|
|
143
|
+
else:
|
|
144
|
+
environ_keys = (
|
|
145
|
+
'OSS_ENDPOINT', 'AWS_ENDPOINT_URL_S3', 'AWS_ENDPOINT_URL')
|
|
146
|
+
for environ_key in environ_keys:
|
|
147
|
+
environ_endpoint_url = os.environ.get(environ_key)
|
|
148
|
+
if environ_endpoint_url:
|
|
149
|
+
warning_endpoint_url(environ_key, environ_endpoint_url)
|
|
150
|
+
return environ_endpoint_url
|
|
147
151
|
try:
|
|
148
|
-
|
|
149
|
-
|
|
152
|
+
config = get_scoped_config(profile_name=profile_name)
|
|
153
|
+
config_endpoint_url = config.get('s3', {}).get('endpoint_url')
|
|
154
|
+
config_endpoint_url = config_endpoint_url or config.get('endpoint_url')
|
|
150
155
|
if config_endpoint_url:
|
|
151
156
|
warning_endpoint_url('~/.aws/config', config_endpoint_url)
|
|
152
157
|
return config_endpoint_url
|
megfile/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "3.0.
|
|
1
|
+
VERSION = "3.0.4"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: megfile
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.4
|
|
4
4
|
Summary: Megvii file operation library
|
|
5
5
|
Home-page: https://github.com/megvii-research/megfile
|
|
6
6
|
Author: megvii
|
|
@@ -160,10 +160,10 @@ Using `s3` as an example, the following describes the configuration methods. For
|
|
|
160
160
|
You can use environments and configuration file for configuration, and priority is that environment variables take precedence over configuration file.
|
|
161
161
|
|
|
162
162
|
### Use environments
|
|
163
|
-
You can use environments to setup authentication credentials for your s3 account:
|
|
163
|
+
You can use environments to setup authentication credentials for your `s3` account:
|
|
164
164
|
- `AWS_ACCESS_KEY_ID`: access key
|
|
165
165
|
- `AWS_SECRET_ACCESS_KEY`: secret key
|
|
166
|
-
- `OSS_ENDPOINT`: endpoint url of s3
|
|
166
|
+
- `OSS_ENDPOINT` / `AWS_ENDPOINT_URL_S3` / `AWS_ENDPOINT_URL`: endpoint url of s3
|
|
167
167
|
- `AWS_S3_ADDRESSING_STYLE`: addressing style
|
|
168
168
|
|
|
169
169
|
### Use command
|
|
@@ -11,14 +11,14 @@ megfile/http_path.py,sha256=WJd8-s_xsF71rC2QtXikH--FCsqn2u-e83YF8OarKeY,11593
|
|
|
11
11
|
megfile/interfaces.py,sha256=h3tWE8hVt5S-HopaMAX6lunPJ97vzhv6jH_2HubcDNc,6219
|
|
12
12
|
megfile/pathlike.py,sha256=Ere6tMf2nsI7bDsZo0WBzl_2HRrS_4iKOpYp0zZltAU,29487
|
|
13
13
|
megfile/s3.py,sha256=siBZfveWX1TDA4Mp41UvugcG3zlrhl_iPUbixUp1TmI,12352
|
|
14
|
-
megfile/s3_path.py,sha256=
|
|
14
|
+
megfile/s3_path.py,sha256=spksQesniQOYWmfIPfJeU4kMSiFAIlB8v2yIHVRLliA,91305
|
|
15
15
|
megfile/sftp.py,sha256=JCkF2v1ZbHuIy_Bg3l85AesjFDimDzx9Gh1gRoMsahc,12524
|
|
16
16
|
megfile/sftp_path.py,sha256=ErPKmwgaCOvvhp3aKhqX9WKIAGbWR30QUWvptQWtag8,51666
|
|
17
17
|
megfile/smart.py,sha256=y5Dzr7_f0jS2FJDF4tWbEO4SPf39zqYftqkVgMhiJds,33725
|
|
18
18
|
megfile/smart_path.py,sha256=Y0UFh4J2ccydRY2W-wX2ubaf9zzJx1M2nf-VLBGe4mk,6749
|
|
19
19
|
megfile/stdio.py,sha256=yRhlfUA2DHi3bq-9cXsSlbLCnHvS_zvglO2IYYyPsGc,707
|
|
20
20
|
megfile/stdio_path.py,sha256=eQulTXUwHvUKA-5PKCGfVNiEPkJhG9YtVhtU58OcmoM,2873
|
|
21
|
-
megfile/version.py,sha256=
|
|
21
|
+
megfile/version.py,sha256=DnboapDM00MYgi1PslOAcm9O5A6fEv0tG12NA4yH9TI,19
|
|
22
22
|
megfile/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
megfile/lib/base_prefetch_reader.py,sha256=WKwrpuniO8a1iU2k5mIHEpuBP8caLtIeqLrpKbmqX_A,13185
|
|
24
24
|
megfile/lib/combine_reader.py,sha256=XFSqEY5A5X5Uf7eQ6AXAzrvNteESSXvKNVPktGjo3KY,4546
|
|
@@ -43,10 +43,10 @@ megfile/lib/stdio_handler.py,sha256=QDWtcZxz-hzi-rqQUiSlR3NrihX1fjK_Rj9T2mdTFEg,
|
|
|
43
43
|
megfile/lib/url.py,sha256=VbQLjo0s4AaV0iSk66BcjI68aUTcN9zBZ5x6-cM4Qvs,103
|
|
44
44
|
megfile/utils/__init__.py,sha256=xrBIJcVJTb_yR68ekAyd9u4HQ46s3xgIjUZoH_Lx7hU,9531
|
|
45
45
|
megfile/utils/mutex.py,sha256=-2KH3bNovKRd9zvsXq9n3bWM7rQdoG9hO7tUPxVG_Po,2538
|
|
46
|
-
megfile-3.0.
|
|
47
|
-
megfile-3.0.
|
|
48
|
-
megfile-3.0.
|
|
49
|
-
megfile-3.0.
|
|
50
|
-
megfile-3.0.
|
|
51
|
-
megfile-3.0.
|
|
52
|
-
megfile-3.0.
|
|
46
|
+
megfile-3.0.4.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
47
|
+
megfile-3.0.4.dist-info/LICENSE.pyre,sha256=9lf5nT-5ZH25JijpYAequ0bl8E8z5JmZB1qrjiUMp84,1080
|
|
48
|
+
megfile-3.0.4.dist-info/METADATA,sha256=ULNUWUSidVxRQfUIJquDdSrV87Os1OQByXqRhO-7TPw,8963
|
|
49
|
+
megfile-3.0.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
50
|
+
megfile-3.0.4.dist-info/entry_points.txt,sha256=M6ZWSSv5_5_QtIpZafy3vq7WuOJ_5dSGQQnEZbByt2Q,49
|
|
51
|
+
megfile-3.0.4.dist-info/top_level.txt,sha256=i3rMgdU1ZAJekAceojhA-bkm3749PzshtRmLTbeLUPQ,8
|
|
52
|
+
megfile-3.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|