Skip to main content

Make aiohttp easier

Project description

ez_aiohttp

The aiohttp wrapper to make it more like requests.

How to use

It is kinda like requests, but it is async. And you need to import aiohttp if you want to use more than GET,POST,PUT,PATCH,DELETE.
This just make it more simple.
Here's an example:

import aiohttp,ez_rq,ez_rq.util

async def main():
    a = ez_rq.get('https://www.google.com')
    print(await a.text())
    b = ez_rq.post('https://www.google.com',data={'a':'b'})
    print(await b.text())
    c = ez_rq.put('https://www.google.com',data={'a':'b'})
    print(await c.text())
    d = ez_rq.patch('https://www.google.com',data={'a':'b'})
    print(await d.text())
    e = ez_rq.delete('https://www.google.com')
    print(await e.text())
    f = await ez_rq.util.json2attr(a) # or you can send the dictionary
    f.a = 'b'
    print(await ez_rq.util.attr2json(f))

etc.
It always return aiohttp.client_reqrep.ClientResponse object.
doc

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

ez_aiohttp-0.1.0.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

ez_aiohttp-0.1.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file ez_aiohttp-0.1.0.tar.gz.

File metadata

  • Download URL: ez_aiohttp-0.1.0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for ez_aiohttp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 63f518dadb595983312a732089d2b8ba4128896c9c16c922065fc224235c283c
MD5 03b69c88cc8f3f5f242728576a1a1f28
BLAKE2b-256 92d1351db9b44c5db41aa12f10b83b0af847fe5913b06a4aaa747aa619cd7d1f

See more details on using hashes here.

File details

Details for the file ez_aiohttp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ez_aiohttp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for ez_aiohttp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20f4b92efdde42c12f82a9a55d0d7c726214a2faeb24361df3743660b3c04754
MD5 5dc359b4d1c442dcea91d333c859005e
BLAKE2b-256 aaa8f03b8c5d0e4c93f89cc5fba073af0993e23fe82e2942e0500c85502b936f

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