Skip to content

Commit 935f803

Browse files
committed
Add python_multipart package and related files for multipart handling
1 parent 29512ec commit 935f803

30 files changed

+2226
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This only works if using a file system, other loaders not implemented.
2+
3+
import importlib.util
4+
import sys
5+
import warnings
6+
from pathlib import Path
7+
8+
for p in sys.path:
9+
file_path = Path(p, "multipart.py")
10+
try:
11+
if file_path.is_file():
12+
spec = importlib.util.spec_from_file_location("multipart", file_path)
13+
assert spec is not None, f"{file_path} found but not loadable!"
14+
module = importlib.util.module_from_spec(spec)
15+
sys.modules["multipart"] = module
16+
assert spec.loader is not None, f"{file_path} must be loadable!"
17+
spec.loader.exec_module(module)
18+
break
19+
except PermissionError:
20+
pass
21+
else:
22+
warnings.warn("Please use `import python_multipart` instead.", PendingDeprecationWarning, stacklevel=2)
23+
from python_multipart import *
24+
from python_multipart import __all__, __author__, __copyright__, __license__, __version__
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from python_multipart.decoders import *
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from python_multipart.exceptions import *
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from python_multipart.multipart import *
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pip
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Metadata-Version: 2.4
2+
Name: python-multipart
3+
Version: 0.0.20
4+
Summary: A streaming multipart parser for Python
5+
Project-URL: Homepage, https://github.com/Kludex/python-multipart
6+
Project-URL: Documentation, https://kludex.github.io/python-multipart/
7+
Project-URL: Changelog, https://github.com/Kludex/python-multipart/blob/master/CHANGELOG.md
8+
Project-URL: Source, https://github.com/Kludex/python-multipart
9+
Author-email: Andrew Dunham <andrew@du.nham.ca>, Marcelo Trylesinski <marcelotryle@gmail.com>
10+
License-Expression: Apache-2.0
11+
License-File: LICENSE.txt
12+
Classifier: Development Status :: 5 - Production/Stable
13+
Classifier: Environment :: Web Environment
14+
Classifier: Intended Audience :: Developers
15+
Classifier: License :: OSI Approved :: Apache Software License
16+
Classifier: Operating System :: OS Independent
17+
Classifier: Programming Language :: Python :: 3
18+
Classifier: Programming Language :: Python :: 3 :: Only
19+
Classifier: Programming Language :: Python :: 3.8
20+
Classifier: Programming Language :: Python :: 3.9
21+
Classifier: Programming Language :: Python :: 3.10
22+
Classifier: Programming Language :: Python :: 3.11
23+
Classifier: Programming Language :: Python :: 3.12
24+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
25+
Requires-Python: >=3.8
26+
Description-Content-Type: text/markdown
27+
28+
# [Python-Multipart](https://kludex.github.io/python-multipart/)
29+
30+
[![Package version](https://badge.fury.io/py/python-multipart.svg)](https://pypi.python.org/pypi/python-multipart)
31+
[![Supported Python Version](https://img.shields.io/pypi/pyversions/python-multipart.svg?color=%2334D058)](https://pypi.org/project/python-multipart)
32+
33+
---
34+
35+
`python-multipart` is an Apache2-licensed streaming multipart parser for Python.
36+
Test coverage is currently 100%.
37+
38+
## Why?
39+
40+
Because streaming uploads are awesome for large files.

0 commit comments

Comments
 (0)