Skip to main content

Lets you make fetch requests in python as you would in JavaScript

Project description

JSFetch

JSFetch is a simple python library that allows you to make HTTP requests in python extaclty the way you would in JavaScript. This allows for sending in requests faster and easier than it's competitors. You also get access to a lot of inbuilt functions to lower the amount of code you need to write.

>>> from jsfetch import fetch
>>> res = fetch("http://httpbin.org/uuid").toJSON()
Promise {<fulfilled>: {}}
>>> res.then(print)
{uuid: '41ddb42d-5d13-406a-a7f1-8fa0419c9267'}
>>> res.status_code
200
>>> res.headers
{'content-type': 'application/json'}

Installing Requests and Supported Versions

JSFetch is available on PyPI:

$ pip install JSFetch --upgrade

JSFetch is currently only tested on Python 3.10 and above.

Todo

  • Static Type the language
  • Make the fetch function return a proper promise
  • Callbacks to be given more data than just the mapped data
  • A fetch class for making requests and returning a promises

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

JSFetch-0.0.5.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

JSFetch-0.0.5-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

File details

Details for the file JSFetch-0.0.5.tar.gz.

File metadata

  • Download URL: JSFetch-0.0.5.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for JSFetch-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2f490adce506456a3c8812f93556877265b6fe3f120e067fecf1aaea8acf1972
MD5 6a02395c538cf2ee7659d17d0b9cecda
BLAKE2b-256 10b26b4622805f5848fd7f036a9c85baa7a348aad2bd8c7f86f9e37b1e2e26e3

See more details on using hashes here.

File details

Details for the file JSFetch-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: JSFetch-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 1.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for JSFetch-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3302371540615c161d312a336332742422bcbd910a4ccbeba53b0a025fdab3d0
MD5 37ae02a11b780e2e9140f2f4a8be1941
BLAKE2b-256 15b6334631714606f944bc6d2c8dd4778eec232779276479e613c02625eee9ff

See more details on using hashes here.

Supported by

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