Aiosonic - lightweight Python asyncio http client

Overview

Build Status github status Coverage Status PyPI version Documentation Status Discord

aiosonic - lightweight Python asyncio http client

Very fast, lightweight Python asyncio http client

Here is some documentation.

There is a performance script in tests folder which shows very nice numbers

» python tests/performance.py
doing tests...
{
 "aiosonic": "1000 requests in 182.03 ms",
 "aiosonic cyclic": "1000 requests in 370.55 ms",
 "aiohttp": "1000 requests in 367.66 ms",
 "requests": "1000 requests in 4613.77 ms",
 "httpx": "1000 requests in 812.41 ms"
}
aiosonic is 101.97% faster than aiohttp
aiosonic is 2434.55% faster than requests
aiosonic is 103.56% faster than aiosonic cyclic
aiosonic is 346.29% faster than httpx

This is a very basic, dummy test, machine dependant. If you look for performance, test and compare your code with this and other packages like aiohttp.

You can perform this test by installing all test dependencies with pip install -e ".[test]" and doing python tests/performance.py in your own machine

Requirements:

  • Python>=3.6
  • PyPy>=3.6

Features:

  • Keepalive and smart pool of connections
  • Multipart File Uploads
  • Chunked responses handling
  • Chunked requests
  • Connection Timeouts
  • Automatic Decompression
  • Follow Redirects
  • Fully type annotated.
  • 100% test coverage (Sometimes not).
  • HTTP2 (BETA) when using the correct flag

Installation

pip install aiosonic

Usage

import asyncio
import aiosonic
import json


async def run():
    client = aiosonic.HTTPClient()

    # ##################
    # Sample get request
    # ##################
    response = await client.get('https://www.google.com/')
    assert response.status_code == 200
    assert 'Google' in (await response.text())

    # ##################
    # Post data as multipart form
    # ##################
    url = "https://postman-echo.com/post"
    posted_data = {'foo': 'bar'}
    response = await client.post(url, data=posted_data)

    assert response.status_code == 200
    data = json.loads(await response.content())
    assert data['form'] == posted_data

    # ##################
    # Posted as json
    # ##################
    response = await client.post(url, json=posted_data)

    assert response.status_code == 200
    data = json.loads(await response.content())
    assert data['json'] == posted_data

    # ##################
    # Sample request + timeout
    # ##################
    from aiosonic.timeout import Timeouts
    timeouts = Timeouts(
        sock_read=10,
        sock_connect=3
    )
    response = await client.get('https://www.google.com/', timeouts=timeouts)
    assert response.status_code == 200
    assert 'Google' in (await response.text())
    await client.shutdown()

    print('success')


if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(run())

TODO'S

  • HTTP2
    • Get
    • Request with data sending
    • Do a aiosonic release with stable http2
  • Better documentation
  • International Domains and URLs (idna + cache)
  • Basic/Digest Authentication
  • Requests using a http proxy
  • Sessions with Cookie Persistence
  • Elegant Key/Value Cookies

Development

Install packages with pip-tools:

pip install pip-tools
pip-compile
pip-compile test-requirements.in
pip-sync requirements.txt test-requirements.txt

Contribute

  1. Fork
  2. create a branch feature/your_feature
  3. commit - push - pull request

Thanks :)

Contributors

Comments
  • sometime throws HttpParsingError

    sometime throws HttpParsingError

    so i do a request to an API but it sometimes raise these errors:

    2021-06-27T12:02:51.478515+00:00 app[worker.1]:     return await self.request(url,
    2021-06-27T12:02:51.478515+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/aiosonic/__init__.py", line 738, in request
    2021-06-27T12:02:51.478516+00:00 app[worker.1]:     response = await wait_for(
    2021-06-27T12:02:51.478516+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
    2021-06-27T12:02:51.478516+00:00 app[worker.1]:     return fut.result()
    2021-06-27T12:02:51.478516+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/aiosonic/__init__.py", line 433, in _do_request
    2021-06-27T12:02:51.478518+00:00 app[worker.1]:     async with (await connector.acquire(*args)) as connection:
    2021-06-27T12:02:51.478518+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/aiosonic/connectors.py", line 59, in acquire
    2021-06-27T12:02:51.478518+00:00 app[worker.1]:     raise HttpParsingError('missing hostname')
    2021-06-27T12:02:51.478518+00:00 app[worker.1]: aiosonic.exceptions.HttpParsingError: missing hostname
    

    aiosonic version: 0.10.1

    opened by Sunda001 17
  • Proxy Support

    Proxy Support

    Is your feature request related to a problem? Please describe. No, It is just a suggestion.

    Describe the solution you'd like I want proxy support for the project.

    Describe alternatives you've considered Alternatives, such as httpx, already have this.

    Additional context N/A

    opened by Gowixx 11
  • RuntimeError: aclose(): asynchronous generator is already running

    RuntimeError: aclose(): asynchronous generator is already running

    When im using py-cord with aiosonic, and when im using aiosonic request in slash command, im getting this error.

    To Reproduce Create slash_command using module py-cord add to func with slash command some aiosonic requests. Profit

    Screenshots image

    Additional context Same requests from last issue.

    opened by FF-TeaDoc 9
  • KeyError: 'content_type'

    KeyError: 'content_type'

    When im trying send request on Epic Games service (https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/game/v2/profile/{account_id}/client/FortRerollDailyQuest?profileId=campaign&rvn=-1), im getting error "KeyError: 'content-type'".

    Screenshots await mcp.FortRerollDailyQuest func self.url Full traceback

    opened by FF-TeaDoc 7
  • aiosonic.exceptions.HttpParsingError: missing hostname

    aiosonic.exceptions.HttpParsingError: missing hostname

    Have this error

    Traceback (most recent call last): File "asyncchecker.py", line 46, in check req = await client.post(url, headers={ File "C:\Users\e\AppData\Local\Programs\Python\Python38\lib\site-packages\aiosonic\__init__.py", line 663, in post return await self._request_with_body( File "C:\Users\e\AppData\Local\Programs\Python\Python38\lib\site-packages\aiosonic\__init__.py", line 609, in _request_with_body return await self.request( File "C:\Users\e\AppData\Local\Programs\Python\Python38\lib\site-packages\aiosonic\__init__.py", line 839, in request response = await wait_for( File "C:\Users\e\AppData\Local\Programs\Python\Python38\lib\asyncio\tasks.py", line 483, in wait_for return fut.result() File "C:\Users\e\AppData\Local\Programs\Python\Python38\lib\site-packages\aiosonic\__init__.py", line 491, in _do_request async with (await connector.acquire(*args)) as connection: File "C:\Users\e\AppData\Local\Programs\Python\Python38\lib\site-packages\aiosonic\connectors.py", line 71, in acquire raise HttpParsingError("missing hostname") aiosonic.exceptions.HttpParsingError: missing hostname

    Any idea why is this happening, please ?

    Edit: Proxy is the problem, I don't know why tho

    opened by Wykt 5
  • Bump httpx from 0.15.0 to 0.15.2

    Bump httpx from 0.15.0 to 0.15.2

    ⚠️ Dependabot is rebasing this PR ⚠️

    If you make any changes to it yourself then they will take precedence over the rebase.


    ⚠️ Dependabot is rebasing this PR ⚠️

    If you make any changes to it yourself then they will take precedence over the rebase.


    Bumps httpx from 0.15.0 to 0.15.2.

    Release notes

    Sourced from httpx's releases.

    Version 0.15.2

    0.15.2 (September 23nd, 2020)

    Fixed

    • Fixed response.elapsed property. (Pull #1313)
    • Fixed client authentication interaction with .stream(). (Pull #1312)

    Version 0.15.1

    0.15.1 (September 23nd, 2020)

    Fixed

    • ASGITransport now properly applies URL decoding to the path component, as-per the ASGI spec. (Pull #1307)
    Changelog

    Sourced from httpx's changelog.

    0.15.2 (September 23nd, 2020)

    Fixed

    • Fixed response.elapsed property. (Pull #1313)
    • Fixed client authentication interaction with .stream(). (Pull #1312)

    0.15.1 (September 23nd, 2020)

    Fixed

    • ASGITransport now properly applies URL decoding to the path component, as-per the ASGI spec. (Pull #1307)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 5
  • wait_free_pool loops forever without awaiting?

    wait_free_pool loops forever without awaiting?

    Describe the bug We saw ConnectionPoolTimeouts in prod and did a code review of the relevant code, and found something unusual - covered by a pragma

    To Reproduce n/a - was a review of code

    Expected behavior The wait_free_pool coroutine does not hot loop forever without awaiting

    Screenshots image

    Desktop (please complete the following information):

    • linux

    Smartphone (please complete the following information): n/a

    Additional context It seems to me that if the pool is ever full, this coroutine will loop forever, and the system will never schedule another coroutine. its early so maybe im in space.

    opened by ediphy-dwild 4
  • Bump jinja2 from 2.10.1 to 2.11.3 in /sourcedocs

    Bump jinja2 from 2.10.1 to 2.11.3 in /sourcedocs

    Bumps jinja2 from 2.10.1 to 2.11.3.

    Release notes

    Sourced from jinja2's releases.

    2.11.3

    This contains a fix for a speed issue with the urlize filter. urlize is likely to be called on untrusted user input. For certain inputs some of the regular expressions used to parse the text could take a very long time due to backtracking. As part of the fix, the email matching became slightly stricter. The various speedups apply to urlize in general, not just the specific input cases.

    2.11.2

    2.11.1

    This fixes an issue in async environment when indexing the result of an attribute lookup, like {{ data.items[1:] }}.

    2.11.0

    This is the last version to support Python 2.7 and 3.5. The next version will be Jinja 3.0 and will support Python 3.6 and newer.

    2.10.3

    2.10.2

    Changelog

    Sourced from jinja2's changelog.

    Version 2.11.3

    Released 2021-01-31

    • Improve the speed of the urlize filter by reducing regex backtracking. Email matching requires a word character at the start of the domain part, and only word characters in the TLD. :pr:1343

    Version 2.11.2

    Released 2020-04-13

    • Fix a bug that caused callable objects with __getattr__, like :class:~unittest.mock.Mock to be treated as a :func:contextfunction. :issue:1145
    • Update wordcount filter to trigger :class:Undefined methods by wrapping the input in :func:soft_str. :pr:1160
    • Fix a hang when displaying tracebacks on Python 32-bit. :issue:1162
    • Showing an undefined error for an object that raises AttributeError on access doesn't cause a recursion error. :issue:1177
    • Revert changes to :class:~loaders.PackageLoader from 2.10 which removed the dependency on setuptools and pkg_resources, and added limited support for namespace packages. The changes caused issues when using Pytest. Due to the difficulty in supporting Python 2 and :pep:451 simultaneously, the changes are reverted until 3.0. :pr:1182
    • Fix line numbers in error messages when newlines are stripped. :pr:1178
    • The special namespace() assignment object in templates works in async environments. :issue:1180
    • Fix whitespace being removed before tags in the middle of lines when lstrip_blocks is enabled. :issue:1138
    • :class:~nativetypes.NativeEnvironment doesn't evaluate intermediate strings during rendering. This prevents early evaluation which could change the value of an expression. :issue:1186

    Version 2.11.1

    Released 2020-01-30

    • Fix a bug that prevented looking up a key after an attribute ({{ data.items[1:] }}) in an async template. :issue:1141

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 4
  • Post request returns unsupported media type

    Post request returns unsupported media type

    Describe the bug Using aiosonic I get a 415 status code.

    To Reproduce

    1. set 'Content-Type': "application/json" and "Accept": "application/json" as headers
    2. add a json data

    Expected behavior Getting a 400 status

    Screenshots image The first status code is from aiohttp with the same headers and json, the second one is from aiosonic using the same headers and json

    Desktop (please complete the following information):

    • OS: Windows
    • Browser kk
    • Version kk

    Additional context nothing.

    opened by rei-sys 4
  • proxy 'NoneType' object has no attribute 'reader' error

    proxy 'NoneType' object has no attribute 'reader' error

    picture is worth a thousand words my code and respon https://ibb.co/RvR0PHr

    i'm trying to use proxy but i get 200 http code and 'NoneType' object has no attribute 'reader' with aiosonic when i use requests or aiohttp it work fine

    and in url like https://www.httpbin.org/ip it work fine with aiosonic fine too can anyone help me with this please?

    opened by saarsa 3
  • aiosonic is NOT 288.36% faster than aiohttp

    aiosonic is NOT 288.36% faster than aiohttp

    Running aiosonic performance tests shows only a 20% speed increase over aiohttp which is certainly not as advertised.

    https://replit.com/@gatopeich1/isaiosonicreallyfaster#main.py

    The results are much closer when reducing concurrency, and the test is very limited just doing a GET / against a local server.

    It is really testing "which library is more aggressive about opening new connections" 🙂

    opened by gatopeich 3
  • Bump asgiref from 3.4.1 to 3.6.0

    Bump asgiref from 3.4.1 to 3.6.0

    Bumps asgiref from 3.4.1 to 3.6.0.

    Changelog

    Sourced from asgiref's changelog.

    3.6.0 (2022-12-20)

    • Two new functions are added to the asgiref.sync module: iscoroutinefunction() and markcoroutinefunction().

      Python 3.12 deprecates asyncio.iscoroutinefunction() as an alias for inspect.iscoroutinefunction(), whilst also removing the _is_coroutine marker. The latter is replaced with the inspect.markcoroutinefunction decorator.

      The new asgiref.sync functions are compatibility shims for these functions that can be used until Python 3.12 is the minimum supported version.

      Note that these functions are considered beta, and as such, whilst not likely, are subject to change in a point release, until the final release of Python 3.12. They are included in asgiref now so that they can be adopted by Django 4.2, in preparation for support of Python 3.12.

    • The loop argument to asgiref.timeout.timeout is deprecated. As per other asyncio based APIs, the running event loop is used by default. Note that asyncio provides timeout utilities from Python 3.11, and these should be preferred where available.

    • Support for the ASGI_THREADS environment variable, used by SyncToAsync, is removed. In general, a running event-loop is not available to asgiref at import time, and so the default thread pool executor cannot be configured. Protocol servers, or applications, should set the default executor as required when configuring the event loop at application startup.

    3.5.2 (2022-05-16)

    • Allow async-callables class instances to be passed to AsyncToSync without warning

    • Prevent giving async-callable class instances to SyncToAsync

    3.5.1 (2022-04-30)

    • sync_to_async in thread-sensitive mode now works corectly when the outermost thread is synchronous (#214)

    3.5.0 (2022-01-22)

    ... (truncated)

    Commits
    • 79a1d01 Releasing 3.6.0.
    • 7a6c631 Added release note for coroutine detection shims.
    • bea951e Added Python 3.11 support
    • ea79016 Updated timeout helper to use get_running_loop(). (#337)
    • 36f37c9 Added coroutine detection shims for Python 3.12 (#360)
    • 467c154 Updated pre-commit versions and fixed linting errors.
    • 72c5ca1 Updated flake8 repo location in pre-commit config to github.
    • 8b76e05 Tweak conf.py to fix Sphinx warnings (#355)
    • 9acb1a2 Added missing HTTPResponseTrailersEvent to ASGISendEvent
    • 3b5aaff Added HTTP Trailers extension
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • ConnectTimeOut

    ConnectTimeOut

    when sending 999 req, it gets stuck for a while (15-20 sec) then throws a connection error.

    code:

    async def make_req(ses, dx):
       resp = await ses.post(url, json=dx)
       if resp.status_code in (200, 201):
          print("sent data successfully")
       elif resp.status_code == 429:
          await asyncio.sleep(await resp.json()['retry_after'])
    
    async def main():
       async with aiosonic.HTTPClient() as cli:
          await asyncio.gather(*[asyncio. create_task(make_req(cli, ...)) for i in range(999])
    

    error:

    Traceback (most recent call last):
      File "/data/data/com.termux/files/usr/lib/python3.11/asyncio/tasks.py", line 490, in wait_for
        return fut.result()
               ^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/aiosonic/connection.py", line 48, in connect
        await self._connect(urlparsed, verify, ssl_context, dns_info, http2)
      File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/aiosonic/connection.py", line 95, in _connect
        self.reader, self.writer = await open_connection(                                                                               ^^^^^^^^^^^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/asyncio/streams.py", line 48, in open_connection
        transport, _ = await loop.create_connection(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/asyncio/base_events.py", line 1098, in create_connection
        transport, protocol = await self._create_connection_transport(
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/asyncio/base_events.py", line 1131, in _create_connection_transport
        await waiter
    asyncio.exceptions.CancelledError
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/aiosonic/connectors.py", line 92, in after_acquire
        await wait_for(
      File "/data/data/com.termux/files/usr/lib/python3.11/asyncio/tasks.py", line 492, in wait_for
        raise exceptions.TimeoutError() from exc
    TimeoutError
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/data/data/com.termux/files/home/spam/main.py", line 36, in <module>
        asyncio.run(main())
      File "/data/data/com.termux/files/usr/lib/python3.11/asyncio/runners.py", line 190, in run
        return runner.run(main)
               ^^^^^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/asyncio/runners.py", line 118, in run
        return self._loop.run_until_complete(task)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/asyncio/base_events.py", line 650, in run_until_complete
        return future.result()
               ^^^^^^^^^^^^^^^
      File "/data/data/com.termux/files/home/spam/main.py", line 32, in main
        async with aiosonic.HTTPClient(TCPConnector(pool_size=999)) as ses:
      File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/aiosonic/__init__.py", line 508, in __aexit__
        raise exc
      File "/data/data/com.termux/files/home/spam/main.py", line 33, in main
        await asyncio.gather(*[asyncio.create_task(make_req(ses, ...)) for i in range(999)])
      File "/data/data/com.termux/files/home/spam/main.py", line 21, in make_req
        resp = await ses.post(url, json=data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/aiosonic/__init__.py", line 592, in post
        return await self._request_with_body(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/aiosonic/__init__.py", line 538, in _request_with_body
        return await self.request(
               ^^^^^^^^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/aiosonic/__init__.py", line 768, in request
        response = await wait_for(
                   ^^^^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/asyncio/tasks.py", line 479, in wait_for
        return fut.result()
               ^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/aiosonic/__init__.py", line 418, in _do_request
        async with (await connector.acquire(*args)) as connection:
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/aiosonic/connectors.py", line 74, in acquire
        return await self.after_acquire(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/aiosonic/connectors.py", line 97, in after_acquire
        raise ConnectTimeout()
    aiosonic.exceptions.ConnectTimeout
    
    opened by notvixer 1
  • Bump certifi from 2021.5.30 to 2022.12.7

    Bump certifi from 2021.5.30 to 2022.12.7

    Bumps certifi from 2021.5.30 to 2022.12.7.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 0
  • Bump certifi from 2021.5.30 to 2022.12.7 in /sourcedocs

    Bump certifi from 2021.5.30 to 2022.12.7 in /sourcedocs

    Bumps certifi from 2021.5.30 to 2022.12.7.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 0
  • Bump pytest-asyncio from 0.18.3 to 0.20.3

    Bump pytest-asyncio from 0.18.3 to 0.20.3

    Bumps pytest-asyncio from 0.18.3 to 0.20.3.

    Release notes

    Sourced from pytest-asyncio's releases.

    pytest-asyncio 0.20.3


    title: 'pytest-asyncio'

    image

    image

    image

    Supported Python versions

    image

    pytest-asyncio is a pytest plugin. It facilitates testing of code that uses the asyncio library.

    Specifically, pytest-asyncio provides support for coroutines as test functions. This allows users to await code inside their tests. For example, the following code is executed as a test item by pytest:

    @pytest.mark.asyncio
    async def test_some_asyncio_code():
        res = await library.do_something()
        assert b"expected result" == res
    

    Note that test classes subclassing the standard unittest library are not supported. Users are advised to use unittest.IsolatedAsyncioTestCase or an async framework such as asynctest.

    pytest-asyncio is available under the Apache License 2.0.

    Installation

    To install pytest-asyncio, simply:

    $ pip install pytest-asyncio
    

    ... (truncated)

    Changelog

    Sourced from pytest-asyncio's changelog.

    0.20.3 (22-12-08)

    • Prevent DeprecationWarning to bubble up on CPython 3.10.9 and 3.11.1. [#460](https://github.com/pytest-dev/pytest-asyncio/issues/460) <https://github.com/pytest-dev/pytest-asyncio/issues/460>_

    0.20.2 (22-11-11)

    • Fixes an issue with async fixtures that are defined as methods on a test class not being rebound to the actual test instance. [#197](https://github.com/pytest-dev/pytest-asyncio/issues/197) <https://github.com/pytest-dev/pytest-asyncio/issues/197>_
    • Replaced usage of deprecated @pytest.mark.tryfirst with @pytest.hookimpl(tryfirst=True) [#438](https://github.com/pytest-dev/pytest-asyncio/issues/438) <https://github.com/pytest-dev/pytest-asyncio/pull/438>_

    0.20.1 (22-10-21)

    • Fixes an issue that warned about using an old version of pytest, even though the most recent version was installed. [#430](https://github.com/pytest-dev/pytest-asyncio/issues/430) <https://github.com/pytest-dev/pytest-asyncio/issues/430>_

    0.20.0 (22-10-21)

    • BREAKING: Removed legacy mode. If you're upgrading from v0.19 and you haven't configured asyncio_mode = legacy, you can upgrade without taking any additional action. If you're upgrading from an earlier version or you have explicitly enabled legacy mode, you need to switch to auto or strict mode before upgrading to this version.
    • Deprecate use of pytest v6.
    • Fixed an issue which prevented fixture setup from being cached. [#404](https://github.com/pytest-dev/pytest-asyncio/issues/404) <https://github.com/pytest-dev/pytest-asyncio/pull/404>_

    0.19.0 (22-07-13)

    • BREAKING: The default asyncio_mode is now strict. [#293](https://github.com/pytest-dev/pytest-asyncio/issues/293) <https://github.com/pytest-dev/pytest-asyncio/issues/293>_
    • Removes setup.py since all relevant configuration is present setup.cfg. Users requiring an editable installation of pytest-asyncio need to use pip v21.1 or newer. [#283](https://github.com/pytest-dev/pytest-asyncio/issues/283) <https://github.com/pytest-dev/pytest-asyncio/issues/283>_
    • Declare support for Python 3.11.
    Commits
    • 007e8ec [fix] Prevent DeprecationWarning about existing event loops to bubble up into...
    • 44ca3da Build(deps): Bump zipp from 3.10.0 to 3.11.0 in /dependencies/default (#455)
    • c3c601c Build(deps): Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2 (#456)
    • a962e2b Build(deps): Bump importlib-metadata in /dependencies/default (#454)
    • 56a393a Simplify README, move most content to a separate user documentation. (#448)
    • 3c78732 Build(deps): Bump hypothesis in /dependencies/default (#453)
    • d6a9a72 Build(deps): Bump exceptiongroup in /dependencies/default (#451)
    • 42da7a0 Build(deps): Bump hypothesis in /dependencies/default (#450)
    • 0b281b1 Build(deps): Bump mypy from 0.990 to 0.991 in /dependencies/default (#446)
    • d39589c Update pre-commit hooks (#449)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump uvicorn from 0.18.2 to 0.20.0

    Bump uvicorn from 0.18.2 to 0.20.0

    Bumps uvicorn from 0.18.2 to 0.20.0.

    Release notes

    Sourced from uvicorn's releases.

    Version 0.20.0

    Added

    • Check if handshake is completed before sending frame on wsproto shutdown (#1737)
    • Add default headers to WebSockets implementations (#1606 & #1747) 28/10/22
    • Warn user when reload and workers flag are used together (#1731) 31/10/22

    Fixed

    • Use correct WebSocket error codes on close (#1753) 20/11/22
    • Send disconnect event on connection lost for wsproto (#996) 29/10/22
    • Add SIGQUIT handler to UvicornWorker (#1710) 01/11/22
    • Fix crash on exist with "--uds" if socket doesn't exist (#1725) 27/10/22
    • Annotate CONFIG_KWARGS in UvicornWorker class (#1746) 31/10/22

    Removed

    • Remove conditional on RemoteProtocolError.event_hint on wsproto (#1486) 31/10/22
    • Remove unused handle_no_connect on wsproto implementation (#1759) 17/11/22

    Version 0.19.0

    Added

    • Support Python 3.11 (#1652) 16/09/22
    • Bump minimal httptools version to 0.5.0 (#1645) 13/09/22
    • Ignore HTTP/2 upgrade and optionally ignore WebSocket upgrade (#1661) 19/10/22
    • Add py.typed to comply with PEP 561 (#1687) 07/10/22

    Fixed

    • Set propagate to False on "uvicorn" logger (#1288) 08/10/22
    • USR1 signal is now handled correctly on UvicornWorker. (#1565) 26/08/22
    • Use path with query string on WebSockets logs (#1385) 11/09/22
    • Fix behavior on which "Date" headers were the same per connection (#1706) 19/10/22

    Removed

    • Remove the --debug flag (#1640) 14/09/22
    • Remove the DebugMiddleware (#1697) 07/10/22

    Version 0.18.3

    What's Changed

    • Remove cyclic references on HTTP implementations. (#1604) 24/08/22
    • reload_delay default changed from None to 0.25 on uvicorn.run() and Config. None is not an acceptable value anymore. (#1545) 02/07/22

    Full Changelog: https://github.com/encode/uvicorn/compare/0.18.2...0.18.3

    Changelog

    Sourced from uvicorn's changelog.

    0.20.0 - 2022-11-20

    Added

    • Check if handshake is completed before sending frame on wsproto shutdown (#1737)
    • Add default headers to WebSockets implementations (#1606 & #1747) 28/10/22
    • Warn user when reload and workers flag are used together (#1731) 31/10/22

    Fixed

    • Use correct WebSocket error codes on close (#1753) 20/11/22
    • Send disconnect event on connection lost for wsproto (#996) 29/10/22
    • Add SIGQUIT handler to UvicornWorker (#1710) 01/11/22
    • Fix crash on exist with "--uds" if socket doesn't exist (#1725) 27/10/22
    • Annotate CONFIG_KWARGS in UvicornWorker class (#1746) 31/10/22

    Removed

    • Remove conditional on RemoteProtocolError.event_hint on wsproto (#1486) 31/10/22
    • Remove unused handle_no_connect on wsproto implementation (#1759) 17/11/22

    0.19.0 - 2022-10-19

    Added

    • Support Python 3.11 (#1652) 16/09/22
    • Bump minimal httptools version to 0.5.0 (#1645) 13/09/22
    • Ignore HTTP/2 upgrade and optionally ignore WebSocket upgrade (#1661) 19/10/22
    • Add py.typed to comply with PEP 561 (#1687) 07/10/22

    Fixed

    • Set propagate to False on "uvicorn" logger (#1288) 08/10/22
    • USR1 signal is now handled correctly on UvicornWorker. (#1565) 26/08/22
    • Use path with query string on WebSockets logs (#1385) 11/09/22
    • Fix behavior on which "Date" headers were not updated on the same connection (#1706) 19/10/22

    Removed

    • Remove the --debug flag (#1640) 14/09/22
    • Remove the DebugMiddleware (#1697) 07/10/22

    0.18.3 - 2022-08-24

    Fixed

    • Remove cyclic references on HTTP implementations. (#1604) 24/08/22

    Changed

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
Releases(0.15.0)
Owner
Johanderson Mogollon
Full-Stack dev, cats lover :)
Johanderson Mogollon
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie

HTTPie: human-friendly CLI HTTP client for the API era HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI in

HTTPie 25.4k Jan 01, 2023
HTTP request/response parser for python in C

http-parser HTTP request/response parser for Python compatible with Python 2.x (=2.7), Python 3 and Pypy. If possible a C parser based on http-parser

Benoit Chesneau 334 Dec 24, 2022
Fast HTTP parser

httptools is a Python binding for the nodejs HTTP parser. The package is available on PyPI: pip install httptools. APIs httptools contains two classes

magicstack 1.1k Jan 07, 2023
EasyRequests is a minimalistic HTTP-Request Library that wraps aiohttp and asyncio in a small package that allows for sequential, parallel or even single requests

EasyRequests EasyRequests is a minimalistic HTTP-Request Library that wraps aiohttp and asyncio in a small package that allows for sequential, paralle

Avi 1 Jan 27, 2022
Script to automate PUT HTTP method exploitation to get shell.

Script to automate PUT HTTP method exploitation to get shell.

devploit 116 Nov 10, 2022
A modern/fast python SOAP client based on lxml / requests

Zeep: Python SOAP client A fast and modern Python SOAP client Highlights: Compatible with Python 3.6, 3.7, 3.8 and PyPy Build on top of lxml and reque

Michael van Tellingen 1.7k Jan 01, 2023
T-Reqs: A grammar-based HTTP Fuzzer

T-Reqs HTTP Fuzzer T-Reqs (Two Requests) is a grammar-based HTTP Fuzzer written as a part of the paper titled "T-Reqs: HTTP Request Smuggling with Dif

Bahruz Jabiyev 207 Dec 06, 2022
Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more.

urllib3 is a powerful, user-friendly HTTP client for Python. Much of the Python ecosystem already uses urllib3 and you should too. urllib3 brings many

urllib3 3.2k Dec 29, 2022
Detects request smuggling via HTTP/2 downgrades.

h2rs Detects request smuggling via HTTP/2 downgrades. Requirements Python 3.x Python Modules base64 sys socket ssl certifi h2.connection h2.events arg

Ricardo Iramar dos Santos 89 Dec 22, 2022
Bot que responde automáticamente as perguntas do giga unitel

Gigabot+ Bot que responde automáticamente as perguntas do giga unitel LINK DOWNLOAD: Gigabot.exe O script pode apresentar alguns erros, pois não tive

Joaquim Roque 20 Jul 16, 2021
Screaming-fast Python 3.5+ HTTP toolkit integrated with pipelining HTTP server based on uvloop and picohttpparser.

Screaming-fast Python 3.5+ HTTP toolkit integrated with pipelining HTTP server based on uvloop and picohttpparser.

Paweł Piotr Przeradowski 8.6k Jan 04, 2023
HTTP/2 for Python.

Hyper: HTTP/2 Client for Python This project is no longer maintained! Please use an alternative, such as HTTPX or others. We will not publish further

Hyper 1k Dec 23, 2022
Aiohttp-openmetrics - OpenMetrics endpoint provider for aiohttp

aiohttp-openmetrics This project contains a simple middleware and /metrics route

Jelmer Vernooij 1 Dec 15, 2022
Asynchronous Python HTTP Requests for Humans using Futures

Asynchronous Python HTTP Requests for Humans Small add-on for the python requests http library. Makes use of python 3.2's concurrent.futures or the ba

Ross McFarland 2k Dec 30, 2022
Python requests like API built on top of Twisted's HTTP client.

treq: High-level Twisted HTTP Client API treq is an HTTP library inspired by requests but written on top of Twisted's Agents. It provides a simple, hi

Twisted Matrix Labs 553 Dec 18, 2022
HackerNews digest using GitHub actions

HackerNews Digest This script makes use of GitHub actions to send daily newsletters with the top 10 posts from HackerNews of the previous day. How to

Rajkumar S 3 Jan 19, 2022
Aiosonic - lightweight Python asyncio http client

aiosonic - lightweight Python asyncio http client Very fast, lightweight Python asyncio http client Here is some documentation. There is a performance

Johanderson Mogollon 93 Jan 06, 2023
hackhttp2 make everything easier

hackhttp2 intro This repo is inspired by hackhttp, but it's out of date already. so, I create this repo to make simulation and Network request easier.

youbowen 5 Jun 15, 2022
Python Simple SOAP Library

PySimpleSOAP / soap2py Python simple and lightweight SOAP library for client and server webservices interfaces, aimed to be as small and easy as possi

PySimpleSOAP 369 Jan 02, 2023
Python Client for the Etsy NodeJS Statsd Server

Introduction statsd is a client for Etsy's statsd server, a front end/proxy for the Graphite stats collection and graphing server. Links The source: h

Rick van Hattem 107 Jun 09, 2022