WebApp2 RequestParser
The webapp2_restful library is a Request parsing interface inspired by restful-flask’s request parser.
Its interface is modeled after the argparse interface.
Its goal is to provide a uniform access to any variable on the webapp2.Request object and allowing handlers to provide a sort of “contract” where they specify the parameters they expect to be called with - making code easier to read and understand.
Free software: BSD license
Documentation: https://webapp2_restful.readthedocs.org.
Basic Argument Parsing
Here’s a simple example of the request parser. It looks for two arguments in the webapp2.Request’s json and params properties: one of type int, and the other of type str:
from webapp2_restful.parser import RequestParser
parser = RequestParser()
parser.add_argument('rate', type=int, help='Rate cannot be converted')
parser.add_argument('name', type=str)
args = parser.parse_args(self.request)
Special Google AppEngine Arguments
from webapp2_restful.parser import RequestParser
from webapp2_restful.arguments_ndb import EntityIDArgument
parser = RequestParser()
parser.add_argument('store_id', type=EntityIDArgument(Store), dest='store')
args = parser.parse_args(self.request)
# args.store is a Store instance
print(args.store)
History
0.1.0 (2015-01-11)
First release on PyPI.
Metadata
Release files for webapp2_restful 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| webapp2_restful-0.1.1.tar.gz | 18.9 kB | Without provenance | Details for webapp2_restful-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| webapp2_restful-0.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for webapp2_restful-0.1.1-py2.py3-none-any.whl |
Total release size: 25.2 kB
Release files / webapp2_restful-0.1.1.tar.gz
| Download URL | webapp2_restful-0.1.1.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ace7db3f20f4bae8eca698339688f4b35d15877da48328e474c961dd4629c609
|
|
BLAKE2b-256 checksum How to use checksums |
83b4809089b92da5cab40218d3e771a64a1b820c9c7147f1312273d9d15a71a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / webapp2_restful-0.1.1-py2.py3-none-any.whl
| Download URL | webapp2_restful-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
dfbafb0c4ec4c2e0483fd639fae42dd0225bf57e005d47115329276d6c30981f
|
|
BLAKE2b-256 checksum How to use checksums |
b6cb38782844971c3e17d88deed68fcaf256237b320810473d0644c84d3fdedf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for webapp2_restful 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.