Trying to make an automated backup script using mega and python, just started..
by - Thursday, January 1, 1970 at 12:00 AM
from os import system
from json import loads

try:
from mega import Mega
except:   
try:
system("pip install mega.py")
    from mega import Mega   
    except:
    print('Pip failed to install MEGA.PY')
exit()
def login(email, password):
mega = Mega()
    handle = mega.login(email, password)
    return handle


def getUserDetails(handle):
details = handle.get_user()
    print(details)


def DownloadFile(handle, fn):
file = handle.find(fn)
    m.download(file, '.')
   
def getFiles(handle):
files = m.get_files()
    return files

credentails = loads(open("config.json", "r").read())

heandle = login(credentials["email"], credentials["pwd"])
# Now we can use  the handle to apply operations, get data, add folders and more....

class MDownloader:
""" class to download stuff from mega.. """
pass
class MUploader:
"""  class to upload files...  """
pass

Anyone interested??
Reply
Looks like a fun project however MegaCMD (https://mega.io/cmd) already has an option for automated backups as well as scripting options.
Reply
(September 16, 2022, 06:37 PM)DataDumper Wrote: Looks like a fun project however MegaCMD (https://mega.io/cmd) already has an option for automated backups as well as scripting options.


Emmmmmm have never heard anything about this route!! Thanks but I just want to make this project for fun and learning purposes.. it is not like I want to just make it because I need it or some..
but I appreciate the comment tho
Reply
(September 17, 2022, 01:12 PM)Moody0101 Wrote:
(September 16, 2022, 06:37 PM)DataDumper Wrote: Looks like a fun project however MegaCMD (https://mega.io/cmd) already has an option for automated backups as well as scripting options.


Emmmmmm have never heard anything about this route!! Thanks but I just want to make this project for fun and learning purposes.. it is not like I want to just make it because I need it or some..
but I appreciate the comment tho

No problem, coding for fun is always good but in a production environment its best to take a look around and see if there's an existing solution for your problem rather than reinvent the wheel.
Reply
(September 17, 2022, 01:14 PM)DataDumper Wrote:
(September 17, 2022, 01:12 PM)Moody0101 Wrote:
(September 16, 2022, 06:37 PM)DataDumper Wrote: Looks like a fun project however MegaCMD (https://mega.io/cmd) already has an option for automated backups as well as scripting options.


Emmmmmm have never heard anything about this route!! Thanks but I just want to make this project for fun and learning purposes.. it is not like I want to just make it because I need it or some..
but I appreciate the comment tho

No problem, coding for fun is always good but in a production environment its best to take a look around and see if there's an existing solution for your problem rather than reinvent the wheel.

100% agree, waisting time on already solved problems in a production env is a waste of money + time tbh..and it effects the business in a bad way..
Reply
Hello Friend
Reply


 Users viewing this thread: Trying to make an automated backup script using mega and python, just started..: No users currently viewing.