Skip to main content

Simple JSONP support for django

Coverage Status Build Status PyPI version Scrutinizer Code Quality Code Health

Installation

Install using pip…

$ pip install django-jsonp

Usage

from djsonp import jsonp, JSONPResponse, get_callback

# decorate something that returns a dict-like object
@jsonp
def my_view(request):
    return {'foo': 'bar'}


# it can work with an HttpResponse instances
@jsonp
def another_view(request):
    return HttpResponse("{'foo': 'bar'}")

# or just return a JSONPResponse
def jsonp_view(request):
    return JSONPResponse(data={'foo': 'bar', }, callback=get_callback(request))

# it also works for CBVs
from django.views.generic import View

@jsonp
class DictResponse(View):
    def get(self, request):
        return HttpResponse("{'foo': 'bar'}")

Metadata

Release files for django_jsonp 0.3.0

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

Source distribution (sdist)

Source distribution for django_jsonp 0.3.0
File Size Uploaded Provenance
django_jsonp-0.3.0.tar.gz 2.8 kB Without provenance Details

Release files / django_jsonp-0.3.0.tar.gz

Download URL django_jsonp-0.3.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7c7202303b6a86959a54568af5c9a435b35573beda688d80c25725717dd681e4
BLAKE2b-256 checksum
How to use checksums
3f63ab476672025a0b436581d3bbea0652b05406f7b132d39ffb886baa4e2791
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django_jsonp 0.3.0

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.

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file No provenance

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