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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

Uploaded PyPy macOS 10.9+ x86-64

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

Uploaded PyPy macOS 10.9+ x86-64

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

Uploaded PyPy macOS 10.9+ x86-64

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

acurl-1.0.3-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.3-cp39-cp39-macosx_11_0_arm64.whl (112.4 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

acurl-1.0.3-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.3-cp38-cp38-macosx_11_0_arm64.whl (111.2 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

acurl-1.0.3-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.3-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.3-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.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for acurl-1.0.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0ad90e23bee4d4727dd09a7399caa1410b4dd4f8ceef223b140d153e5c257b7f
MD5 96c5e130c434525767ac342edec6f156
BLAKE2b-256 6e21f565a926d9c79f6827122e2bb27f695df8480fed540482acb896d8231910

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for acurl-1.0.3-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fb59ea07fe8594ace7f7ecff65ca0285523b4dd0832fac55555c64ff78f3a7d9
MD5 25fecebbcf052e92de82560f37fda879
BLAKE2b-256 08cc796c3290671d8fa2c0db7dc03768b21fac449ea8c20464107d7e7dbb0653

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for acurl-1.0.3-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5bc648d83e04e4580dc384373dcca910bc25a737e3dda0158077a194b2442dfc
MD5 56bad7d7b278de04aac58e1adc02de73
BLAKE2b-256 48b3a29fb1958d552834de5790e41dbcc1175a97b6ffc56e803b8f7023d19a07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for acurl-1.0.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 23f8930f3ab36f0c910a61150e5c5252e69bebe66ee112417227775ac2e35a21
MD5 d34f1d2bcbbf114361137b32e28a322d
BLAKE2b-256 1907fa6cf02b23090cfc2dbb04150eaae6763cf0b765962412b8ae6c655e81af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for acurl-1.0.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 89a5ec570ecb3db3f274e09688bb1385fc31ae7e2f05690fc1e59b719561faf9
MD5 1cdfa22bd5fe0f8ec3723f9ff35cd9c4
BLAKE2b-256 0ca8fd507e1905af7beb5318248da24238c024fb028ffb01cc7ea45dfd646b18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for acurl-1.0.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f70804fcd66891b3b93bab8395cf46218e21b71348b29fa1d112f0d7dabc379d
MD5 d01f8b8deb1454cff0abac5da5e80a0c
BLAKE2b-256 7fc5a686f0423aaeada90b9f3febe0ca28621b91526e3a2a5e2f001060d1bc63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for acurl-1.0.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0a8f2a167db5bfb24d61e38cae9e7f6db3ff9189d95bbd97cc8eefd8f7ac9a37
MD5 323ae40819a8dd1e34409c84ef04889f
BLAKE2b-256 ad6d846cc887c7188d5ff2917362a79ad3b9dac798afd73ddc839a4ea2fb8634

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for acurl-1.0.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7dce6f990e217fd050c92174c97b62d9ad063523c01012b4dbe02592547a2bc3
MD5 a03f554bb954995bc13e52f0697acd87
BLAKE2b-256 ed3678aba813088b53ff345cae75208c10d3f7d23ed9f78486dcf31136d104b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for acurl-1.0.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e910e4fcb010ecf185cb9a55b6d1df60b827b8d88dd79c70ad2dd11b6443648d
MD5 feca811f5c55c72dd2d46c66a8a80464
BLAKE2b-256 630cfae5d2aa5d88faebc0216dbb1917df5fcfee25454c274c94a8752bb0f9d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for acurl-1.0.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 87eaa2c37ad650b33f3fb762ee1603cafdbe6ec8b9222e11d44da2cdde67d263
MD5 8345abe4aca0d99970acb9c0d22d93ad
BLAKE2b-256 3bf533d3fa0c0a871e53ee7c6041aef5eb5dc32fc8d9985edcc1feee77ae8873

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for acurl-1.0.3-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b3167f3b43169279610a76a47f555c2ba980304fa64d08087503424f2adbd14f
MD5 ebd9c38381594c02915d84ae38a98fef
BLAKE2b-256 4d7afe94332c899cd3006d3d8092901dd894a6b29cd4433aa39dce71355c503a

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