I just stumbled with python-multipart. It looks really interesting because you can actually work with its stream processing engine to deal with files (something I think would be nice to have in Sanic) and parameters. It haves some neat examples and I don’t think it would be hard to do it. The only con I see would be:
- Add a new dependency
One thing I don’t know if it’s a con or not (@ahopkins, your expertise here would be awesome), is that python-multipart is licensed under the Apache License version 2.0, which as a dependency I don’t know the caveats of its usage.
Even if the license would not be an issue but adding another dependency is, I guess it may help a lot of people to make their own protocol
implementations using it if absolutely required.