Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Wrapper around the Mega API
branch: master

Merge pull request #3 from Matt3o12/master

Better exception handling.
latest commit 99a261ed6b
Juan Riaza authored
Failed to load latest commit information.
mega Bugfixes
.gitignore first commit
.travis.yml add secure env for tests
CONTRIBUTORS.md add contributors file
MANIFEST.in first commit
README.md add contributors file
requirements.txt download from an url
setup.py flake8
tests.py Types...

README.md

python-mega

Build Status

Overview

Wrapper around the Mega API. Based on the work of Julien Marchand.

Installation

Install using pip, including any optional packages you want...

$ pip install python-mega

...or clone the project from github.

$ git clone git@juanriaza/python-mega.git
$ cd python-mega
$ pip install -r requirements.txt

How to use it?

With your credentials:

from mega import Mega

email = 'kim@dot.com'
password = 'olakase'

m = Mega.from_credentials(email, password)

…or you can use an ephemeral account:

m = Mega.from_ephemeral()

And fire some requests:

# list of files
files = m.get_files()
# download a file
m.download_file(file_id, file_key)
# upload a file
m.uploadfile('/home/kim/mega/secret_plans')
# download from an url
m.download_from_url('https://mega.co.nz/#!wYo3AYZC!Zwi1f3ANtYwKNOc07fwuN1enOoRj4CreFouuGqi4D6Y')

Running the tests

$ ./tests.py

Changelog

0.1.0

31th Jan 2012

  • First release.

Acknowledgements

  • Many thanks to Julien Marchand for the initial work.
  • All of the contributors to this project.
Something went wrong with that request. Please try again.