Skip to content

Commit 20760de

Browse files
author
liyang
committed
feat: introduce HFPath
1 parent ac08679 commit 20760de

File tree

4 files changed

+587
-0
lines changed

4 files changed

+587
-0
lines changed

megfile/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
is_hdfs,
6666
)
6767
from megfile.hdfs_path import HdfsPath
68+
from megfile.hf_path import HFPath
6869
from megfile.http import (
6970
http_exists,
7071
http_getmtime,
@@ -396,6 +397,7 @@
396397
"hdfs_makedirs",
397398
"S3Path",
398399
"FSPath",
400+
"HFPath",
399401
"HttpPath",
400402
"HttpsPath",
401403
"StdioPath",

megfile/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,8 @@
6060
SFTP_MAX_RETRY_TIMES = int(
6161
os.getenv("MEGFILE_SFTP_MAX_RETRY_TIMES") or DEFAULT_MAX_RETRY_TIMES
6262
)
63+
HF_MAX_RETRY_TIMES = int(
64+
os.getenv("MEGFILE_HF_MAX_RETRY_TIMES") or DEFAULT_MAX_RETRY_TIMES
65+
)
6366

6467
HTTP_AUTH_HEADERS = ("Authorization", "Www-Authenticate", "Cookie", "Cookie2")

0 commit comments

Comments
 (0)