Skip to main content

An async Curl library.

Project description

Acurl

It is an asynchronous wrapper around libcurl which is built to interface with the Uvloop python library.

Using Acurl In Mite

The gateway into Acurl is through the CurlWrapper (discussed in Architectural Notes) and requires an event loop being passed to its constructor. Below is the mite implementation of acurl:

class SessionPool:
    ...
    def __init__(self):
        import acurl
        self._wrapper = acurl.CurlWrapper(asyncio.get_event_loop())
        ...

Architectural Notes

Acurl uses a single loop maintained within python using UVloop.

Acurl surfaces the CurlWrapper interface which takes the asyncio event loop as an argument. The wrapper deals directly with the curl_multi interface from libcurl, defining 2 functions (curl_perform_write and curl_perform_read) for checking both read and write availability of file descriptors.

There are 2 notable functions within the core Acurl implementation, notably handle_socket and start_timer:

  • handle_socket is passed as a callback function to the curl_multi interface and upon calls to the curl_multi_socket_action function, will receive updates regarding the socket status. We then handle those statuses by either adding or removing the aforementioned readers or writers.
  • start_timer is another callback function that is passed to the curl_multi interface and is used as a way to handle timeouts and retries within curl. Upon a timeout, the timeout callback will be called and the transfer can be retried.

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

acurl-1.0.4.tar.gz (156.9 kB view details)

Uploaded Source

Built Distributions

acurl-1.0.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (89.2 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

acurl-1.0.4-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (88.9 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

acurl-1.0.4-pp37-pypy37_pp73-macosx_10_9_x86_64.whl (89.1 kB view details)

Uploaded PyPy macOS 10.9+ x86-64

acurl-1.0.4-cp310-cp310-macosx_11_0_arm64.whl (110.2 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

acurl-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl (126.1 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

acurl-1.0.4-cp39-cp39-macosx_11_0_arm64.whl (112.4 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

acurl-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl (128.6 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

acurl-1.0.4-cp38-cp38-macosx_11_0_arm64.whl (111.2 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

acurl-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl (125.1 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

acurl-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl (122.1 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

acurl-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl (122.7 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file acurl-1.0.4.tar.gz.

File metadata

  • Download URL: acurl-1.0.4.tar.gz
  • Upload date:
  • Size: 156.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for acurl-1.0.4.tar.gz
Algorithm Hash digest
SHA256 a3fd797efb309bd8fe338bd695a32b2bde52ad3728ee7b28a824bb3dfe97574e
MD5 d6d3582b7f1bd2e37ed3c65943e72851
BLAKE2b-256 5f18350ae49ecf4e4242b022b3d5ab5763fb4b156ba97d5356c7e68d41231143

See more details on using hashes here.

File details

Details for the file acurl-1.0.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for acurl-1.0.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e2b5424050ef0baa89469138a4aa68faf5a79376ac6db3291cac3f30d196f1be
MD5 16483f41b752919b5cb189a650466daf
BLAKE2b-256 65b154fa543b43b5b34abee451b096f28be502e95bf81e6da9fe0c89f6d0c11e

See more details on using hashes here.

File details

Details for the file acurl-1.0.4-pp38-pypy38_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for acurl-1.0.4-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7c0b0e102fef2b14c725a61a2ecbfb7e0ee7a0a860a0ce3ea4224e4fd6456ac8
MD5 c6322796e4233a189bc89f4e54d5d2dc
BLAKE2b-256 c199e546ba63ebebe851cc8ea5b99fd93ec754028c3fe31d6fa3d3392c7b9cd1

See more details on using hashes here.

File details

Details for the file acurl-1.0.4-pp37-pypy37_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for acurl-1.0.4-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 da6120663f71776545c5bb58d11664827be47ea494847c307c7d2e759fd453ec
MD5 4548a909ff2ca5d8bb53db1c5389c7ec
BLAKE2b-256 2a91fe6598b42a8581cff0889c25ccbc55fd79a079ab98fc6a7b6d1307e20e37

See more details on using hashes here.

File details

Details for the file acurl-1.0.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for acurl-1.0.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 44ea8355ae2d49ff0976f670f99997b12dba49da4f72d35cdd2029f15096776b
MD5 b08988b21a6dd3db098c0fa9eafc2d49
BLAKE2b-256 5c25973c641ac445061db24ab09969fda367b4f2d4d7c0bd4187007b9c6a26e4

See more details on using hashes here.

File details

Details for the file acurl-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for acurl-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6ee8008ee965cf6b110f60cc8f89daef7aa6a4bee253a052134394523dbf8aba
MD5 66d0b6f1087ce3b75f257ddb00ee2246
BLAKE2b-256 583f677179bc4890902506cfbf8ab4d73b4b9c3a9bda31248753316abbdf6f36

See more details on using hashes here.

File details

Details for the file acurl-1.0.4-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for acurl-1.0.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 42892d143cf06e9cf58115877deb9e9fdce0d7886ef1348c5ffcb03ad567dc46
MD5 2d757a79035411bfffea6fd05b01486b
BLAKE2b-256 6947cacc91d6fee272fc752082c2171bbd156e7b9059041116bfe9ef4b47950f

See more details on using hashes here.

File details

Details for the file acurl-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for acurl-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1db1776e28f9bf421af13893ba6d9bf822b8949c7e59c8917d354f3ff19ee435
MD5 58df1052528516c2a8391181ab1bb4a5
BLAKE2b-256 344b279cad17bcaed5b58b52843bbcb99bef14a6e2eb2e7f82941d8738758dde

See more details on using hashes here.

File details

Details for the file acurl-1.0.4-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for acurl-1.0.4-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76727fad6d0c282a3ac54edf3c0695c65441f8a7e49761871769147870c3e0ba
MD5 695c43a49b68b58c1a75dda4bbfee8a1
BLAKE2b-256 dd302ce74d01a383f6a0f576ec4129041f0c6ba3e0bb82fc3b2ab747145e663c

See more details on using hashes here.

File details

Details for the file acurl-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for acurl-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c498005c8b51c39c2d47f887cb710a956058777afa0630d3df19c253367dd22d
MD5 7209058453fc2199512b6c84dead575d
BLAKE2b-256 10c2f7f4127dcf638d70d909fc20a2106d3e57c6775852a458e6bd980c78fa69

See more details on using hashes here.

File details

Details for the file acurl-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for acurl-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0821d58c4494c4aba71077e6a714421d69befcf70ae0277442bc786c1e2e6407
MD5 0795a4d55cbdad82f001f67bce5769c2
BLAKE2b-256 5320ad1ed075e5c0b94dd03fba0c3c86b542fb052878f9f31b62bd9075b719a9

See more details on using hashes here.

File details

Details for the file acurl-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for acurl-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5c11aca158554d57837949238221dc8aae8d9ef08fd2caab7368c9b8d0232404
MD5 dbb8d33e61e7a7320b69dd808fd1eadd
BLAKE2b-256 6fd6375e1ff093ed9b35e119e3db7a61be3214e7b5e0a8c57f146933e7c2de41

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