Skip to content

jorgeajimenezl/aiomega

Repository files navigation

Python Async Mega Client

A asynchronous Mega client that use asyncio. This package wraps the official Mega SDK

Build from source

Dependencies

  • 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

Build

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 .

Getting started

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())

License

MIT License

Author

This program was deverloped by Jorge Alejandro Jiménez Luna <jorgeajimenezl17@gmail.com>

About

A Python Async Mega.nz client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published