Skip to main content

JSON-P base view for Grok

This is a base view for Grok, which enables you to make JSON-P calls to your Grok application. It works nearly the same as the grokcore.json.JSON view, except the fact, that it requires the name of a JavaScript callback in the request into which it wraps the JSON data returned by your view.

>>> import sw.grokcore.json
>>> class MyView(sw.grokcore.jsonp.JSONP):
...     ...
...     def data(self):
...         return {'foo': 1234}
>>> print http('GET /data?callback=jQuery-123 HTTP/1.1')
HTTP/1.0 200 Ok
Content-Length: 30
Content-Type: application/json
<BLANKLINE>
jQuery-123({'foo': 1234});

CHANGELOG

0.1 (2012-04-12)

  • initial release

Release files for sw.grokcore.jsonp 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sw.grokcore.jsonp 0.1
File Size Uploaded
sw.grokcore.jsonp-0.1.tar.gz 5.4 kB Details

Release files / sw.grokcore.jsonp-0.1.tar.gz

Download URL sw.grokcore.jsonp-0.1.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
222b278080262886fb82c6c8a71f9ac2ab28a87f7df6a48d0681141595e73417
BLAKE2b-256 checksum
How to use checksums
1d44dddbb867fad6d46c42089319963a85a84e768f27549904c6a3f4fe4b4e3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page