guess-file-mime-type 0.1.0a0__py2.py3-none-any.whl → 0.1.0a1__py2.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.
- {guess_file_mime_type-0.1.0a0.dist-info → guess_file_mime_type-0.1.0a1.dist-info}/METADATA +1 -2
- guess_file_mime_type-0.1.0a1.dist-info/RECORD +6 -0
- guess_file_mime_type.py +2 -7
- guess_file_mime_type-0.1.0a0.dist-info/RECORD +0 -6
- {guess_file_mime_type-0.1.0a0.dist-info → guess_file_mime_type-0.1.0a1.dist-info}/WHEEL +0 -0
- {guess_file_mime_type-0.1.0a0.dist-info → guess_file_mime_type-0.1.0a1.dist-info}/licenses/LICENSE +0 -0
- {guess_file_mime_type-0.1.0a0.dist-info → guess_file_mime_type-0.1.0a1.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: guess-file-mime-type
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.0a1
|
4
4
|
Summary: A minimal, cross-platform, and cross-version utility to safely guess a file's MIME type.
|
5
5
|
Author-email: Jifeng Wu <jifengwu2k@gmail.com>
|
6
6
|
License-Expression: MIT
|
@@ -12,7 +12,6 @@ Classifier: Operating System :: OS Independent
|
|
12
12
|
Requires-Python: >=2
|
13
13
|
Description-Content-Type: text/markdown
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: posix-or-nt
|
16
15
|
Dynamic: license-file
|
17
16
|
|
18
17
|
# guess-file-mime-type
|
@@ -0,0 +1,6 @@
|
|
1
|
+
guess_file_mime_type.py,sha256=t8wsxJhRJI64f90IyKsszD3ZRjZ-zSaneX4u9eLykzI,579
|
2
|
+
guess_file_mime_type-0.1.0a1.dist-info/licenses/LICENSE,sha256=FZ9XWedK_wQ4wfqVanrQVQpArRHDkxwxic2rgii1pZg,1066
|
3
|
+
guess_file_mime_type-0.1.0a1.dist-info/METADATA,sha256=8K5Wzp_hgKIQ5mq53m5mzgUh7FKnTlJZuG0YV5BRIYY,1640
|
4
|
+
guess_file_mime_type-0.1.0a1.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
|
5
|
+
guess_file_mime_type-0.1.0a1.dist-info/top_level.txt,sha256=MBq_R_Nvwu7G0N8KsP3lJfVxmhGVKAX5i7lT-BaxHZY,21
|
6
|
+
guess_file_mime_type-0.1.0a1.dist-info/RECORD,,
|
guess_file_mime_type.py
CHANGED
@@ -4,19 +4,14 @@
|
|
4
4
|
import mimetypes
|
5
5
|
import sys
|
6
6
|
|
7
|
-
from posix_or_nt import posix_or_nt
|
8
|
-
if posix_or_nt() == 'nt':
|
9
|
-
import ntpath as os_path
|
10
|
-
else:
|
11
|
-
import posixpath as os_path
|
12
7
|
|
13
8
|
if sys.version_info >= (3, 13):
|
14
9
|
def guess_file_mime_type(file_path):
|
15
10
|
# type: (str) -> str
|
16
|
-
mime_type, _ = mimetypes.guess_file_type(
|
11
|
+
mime_type, _ = mimetypes.guess_file_type(file_path)
|
17
12
|
return mime_type or 'application/octet-stream'
|
18
13
|
else:
|
19
14
|
def guess_file_mime_type(file_path):
|
20
15
|
# type: (str) -> str
|
21
|
-
mime_type, _ = mimetypes.guess_type(
|
16
|
+
mime_type, _ = mimetypes.guess_type(file_path)
|
22
17
|
return mime_type or 'application/octet-stream'
|
@@ -1,6 +0,0 @@
|
|
1
|
-
guess_file_mime_type.py,sha256=dczYLa0eMvEkxanZPbL65kuyNcl812-NfE3rkpSVLlI,744
|
2
|
-
guess_file_mime_type-0.1.0a0.dist-info/licenses/LICENSE,sha256=FZ9XWedK_wQ4wfqVanrQVQpArRHDkxwxic2rgii1pZg,1066
|
3
|
-
guess_file_mime_type-0.1.0a0.dist-info/METADATA,sha256=hMWbBFjM9t51qUpU659FpsmQGTlZCS6gRsbLpNfFFV4,1667
|
4
|
-
guess_file_mime_type-0.1.0a0.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
|
5
|
-
guess_file_mime_type-0.1.0a0.dist-info/top_level.txt,sha256=MBq_R_Nvwu7G0N8KsP3lJfVxmhGVKAX5i7lT-BaxHZY,21
|
6
|
-
guess_file_mime_type-0.1.0a0.dist-info/RECORD,,
|
File without changes
|
{guess_file_mime_type-0.1.0a0.dist-info → guess_file_mime_type-0.1.0a1.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
{guess_file_mime_type-0.1.0a0.dist-info → guess_file_mime_type-0.1.0a1.dist-info}/top_level.txt
RENAMED
File without changes
|