Skip to main content

A simple CORS proxy utility with requests-like response

Project description

jupyterlite-simple-cors-proxy

Simple CORS proxy for making http requests from JupyterLite

Installation

pip install jupyterlite-simple-cors-proxy

Usage

from simple_cors_proxy import cors_proxy_get, robust_get_request

# Make a request
url = "https://api.example.com/data"
params = {"key": "value"}
response = cors_proxy(url, params)

# Use like requests
print(response.text)
data = response.json()
raw = response.content

The robust_get_request() will first try a simple reuqst, then a proxied request: robust_get_request(url, params)

Features

  • Simple CORS proxy wrapper
  • Requests response object
  • Support for URL parameters

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterlite_simple_cors_proxy-0.1.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file jupyterlite_simple_cors_proxy-0.1.2.tar.gz.

File metadata

File hashes

Hashes for jupyterlite_simple_cors_proxy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2a63ca5b2ade03ad1898d4bbdab9ba669016e79d8bced05f0ca84cef84003e30
MD5 342fd353a36d81c7e6df0977f3088543
BLAKE2b-256 1fe8c3502eeb5081ef89c1bb3fc1fa2452956c5a32721a9838356474fcd4eae1

See more details on using hashes here.

File details

Details for the file jupyterlite_simple_cors_proxy-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlite_simple_cors_proxy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8ebe7f1316f0975082b0d89c3a06f356045ef0d0b1bc5387ed507fd78c7a02c2
MD5 9dc4cb3b346d97bafdd738819ab53c6c
BLAKE2b-256 3a72f38260edc64921786b603c51c034ee84a5ae26a89d8595c1c2ca04f436a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page