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
  • Fetch should be able to be called in top level without async and can be blocking in that use
  • Fetch can be awaitable when called in an async function and also not be blocking

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.6.tar.gz (3.2 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.6-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: JSFetch-0.0.6.tar.gz
  • Upload date:
  • Size: 3.2 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.6.tar.gz
Algorithm Hash digest
SHA256 322068527cfd98b9691474175dc0b34e45c79e2a474371c0cc3072a804e99333
MD5 73e4b164de1cdf8da49380da2939f34d
BLAKE2b-256 7b5da3f8c9348098968ff82bd022fa50c3c138934cfec3942afd001cb50df431

See more details on using hashes here.

File details

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

File metadata

  • Download URL: JSFetch-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 3.4 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f7cbba3a88d1be1977aeea6d7db06ac2bf621d636b8e3c85bc84f02d53d0c1c7
MD5 037e1fef3c67c47541daad939a021e23
BLAKE2b-256 d75dcb869fc09d1ad1efe8247578e69660ca1fa56355d0c70f8b8efae7ee8c62

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