A asynchronous Mega client that use asyncio
. This package wraps the official Mega SDK
- cURL (
libcurl4-openssl-dev
,libcurl-devel
), compiled with--enable-ssl
- c-ares (
libc-ares-dev
,libcares-devel
,c-ares-devel
) - OpenSSL (
libssl-dev
,openssl-devel
) - Crypto++ (
libcrypto++-dev
,libcryptopp-devel
) - zlib (
zlib1g-dev
,zlib-devel
) - pthread
To build this package from source open the terminal and write:
$ git clone https://github.com/jorgeajimenezl/aiomega.git
$ cd aiomega
$ sh configure.sh
Then, to install it write pip install -e .
from aiomega import Mega
import asyncio
async def main():
async with Mega() as client:
await client.login(email='juan@cabilla.com', password='cabilla')
async def progress(c, t, s):
print(f"{c} bytes / {t} bytes. Speed: {s} bytes/sec")
await client.download('/file', '/path/to/file', progress=progress)
asyncio.run(main())
This program was deverloped by Jorge Alejandro Jiménez Luna <jorgeajimenezl17@gmail.com>