megapy/tests/test.py
richard@richard.do bc70a59bbe First commit
2013-02-04 02:02:33 +00:00

26 lines
No EOL
463 B
Python

from mega import Mega
def test():
#user details
email = 'your@email.com'
password = 'password'
mega = Mega()
#login
m = mega.login(email, password)
#get account files
files = m.get_files()
print(files)
#upload file
print(m.upload('tests/test.py'))
#download file from url
m.download_url('https://mega.co.nz/#!utYjgSTQ!OM4U3V5v_W4N5edSo0wolg1D5H0fwSrLD3oLnLuS9pc')
if __name__ == '__main__':
test()