All Projects → siddhantgoel → streaming-form-data

siddhantgoel / streaming-form-data

Licence: MIT license
Streaming parser for multipart/form-data written in Cython

Programming Languages

python
139335 projects - #7 most used programming language
cython
566 projects
Makefile
30231 projects

Projects that are alternatives of or similar to streaming-form-data

react-apollo-form
Build React forms based on GraphQL APIs.
Stars: ✭ 195 (+74.11%)
Mutual labels:  forms
FrontendForms
A module for ProcessWire CMS to create and validate forms on the frontend easily using the Valitron library.
Stars: ✭ 0 (-100%)
Mutual labels:  forms
RapidFormBundle
Create Symfony forms at record speed using PHP 8 attributes!
Stars: ✭ 33 (-70.54%)
Mutual labels:  forms
forms
Web forms with Substance.
Stars: ✭ 14 (-87.5%)
Mutual labels:  forms
flask-wtf
Simple integration of Flask and WTForms, including CSRF, file upload and Recaptcha integration.
Stars: ✭ 1,357 (+1111.61%)
Mutual labels:  forms
ng-xform
esss.github.io/ng-xform/home
Stars: ✭ 18 (-83.93%)
Mutual labels:  forms
altinn-studio
Next generation open source Altinn platform and applications.
Stars: ✭ 91 (-18.75%)
Mutual labels:  forms
edulabs
No description or website provided.
Stars: ✭ 15 (-86.61%)
Mutual labels:  forms
Build-Former
This is a library for building forms dynamically in Android.
Stars: ✭ 20 (-82.14%)
Mutual labels:  forms
ember-validated-form-buffer
A validated form buffer that wraps Ember Data models for use in forms.
Stars: ✭ 46 (-58.93%)
Mutual labels:  forms
blogging-app-with-Angular-CloudFirestore
A blogging application created with the help of Angular on front-end and Google Cloud Firestore on backend.
Stars: ✭ 45 (-59.82%)
Mutual labels:  forms
activiti-examples
Alfresco Process Services powered by Activiti Examples.
Stars: ✭ 58 (-48.21%)
Mutual labels:  forms
insect
🛠 Highly customisable, minimalistic input x select field for React.
Stars: ✭ 33 (-70.54%)
Mutual labels:  forms
enform
Handle React forms with joy 🍿
Stars: ✭ 38 (-66.07%)
Mutual labels:  forms
react-conversational-ui
🤖 React conversational UI
Stars: ✭ 51 (-54.46%)
Mutual labels:  forms
forms-bootstrap
👾 Bootstrap 4 forms for Nette framework
Stars: ✭ 17 (-84.82%)
Mutual labels:  forms
LC-switch
Superlight vanilla javascript plugin improving forms look and functionality
Stars: ✭ 31 (-72.32%)
Mutual labels:  forms
react-forms-processor
A forms processor for React
Stars: ✭ 63 (-43.75%)
Mutual labels:  forms
platform
A collection of minimalistic, easy-to-use and fully customizable Angular components, directives and services
Stars: ✭ 17 (-84.82%)
Mutual labels:  forms
form-saver
A simple script that lets users save and reuse form data.
Stars: ✭ 67 (-40.18%)
Mutual labels:  forms

Streaming multipart/form-data parser

image

image

image

image

streaming_form_data provides a Python parser for parsing multipart/form-data input chunks (the encoding used when submitting data over HTTP through HTML forms).

Testimonials

"this speeds up file uploads to my Flask app by more than factor 10"

"Thanks a lot for your fix with streaming-form-data. I can finally upload gigabyte sized files at good speed and without memory filling up!"

Installation

$ pip install streaming-form-data

In case you prefer cloning the Github repository and installing manually, please note that main is the development branch, so stable is what you should be working with.

Usage

>>> from streaming_form_data import StreamingFormDataParser
>>> from streaming_form_data.targets import ValueTarget, FileTarget, NullTarget
>>>
>>> headers = {'Content-Type': 'multipart/form-data; boundary=boundary'}
>>>
>>> parser = StreamingFormDataParser(headers=headers)
>>>
>>> parser.register('name', ValueTarget())
>>> parser.register('file', FileTarget('/tmp/file.txt'))
>>> parser.register('discard-me', NullTarget())
>>>
>>> for chunk in request.body:
...     parser.data_received(chunk)
...
>>>

Documentation

Up-to-date documentation is available on Read the Docs.

Development

Please make sure you have Python 3.6+ and pip-tools installed.

Since this package includes a C extension, please make sure you have a working C compiler available. On Debian-based distros this usually means installing the build-essentials package.

  1. Git clone the repository: git clone https://github.com/siddhantgoel/streaming-form-data

  2. Install the packages required for development: make pip-sync

  3. That's basically it. You should now be able to run the test suite: make test.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].