Package: valaya
ValayaValaya is a secure and customizable cloud storage system built with an open source client. We currently offer 15 GB of cloud storage for free, with monthly plans coming later.Install and RunTo install Valaya, open a terminal and complete the following steps.Install with pip:pip install valayaCreate an account. (Replaceyour_emailwith your email address):valaya -su your_emailLaunch the Valaya command line interface:valayaDone! Now you can access 15 GB of cloud storage.Valaya Command Line InterfaceThe Valaya command line interface (VCLI) provides a simple and efficient way to interact with Valaya directly from a terminal.LaunchTo launch the VCLI, open a terminal and run the following command:valayaAll other commands and options:Command (from terminal)DescriptionvalayaLaunch the VCLI.valaya -siSign in.valaya -suSign up.valaya -pwChange your password.VCLI CommandsAll commands availible in the VCLI:Command (from VCLI)Descriptionul source_path [destination_path]Upload a file or directory. The source is the path on the local filesystem and the destination is the path on the cloud once its uploaded.dl source_path [destination_path]Download a file or directory. The source is the path on the cloud and the destination is the path on the local filesystem once its downloaded.ls [-l] [directory]List files in a directory.-lUse a long listing format. (Additionally shows file size and time of upload.)cd [directory]Change to a different directory.mv old_path new_pathMove or rename a file. The source is the path on the cloud of the file you want to move and the destination is the modified path.rm [-f] pathMove a file or directory into the trash folder.-fPermanently delete a file or directory.quota [-l]Show how much total and daily storage is left.-lUse a long format. (Shows storage in bytes.)pwdShow the current directory.qQuit the interface.Privacy and SecurityEncryptionAll files uploaded to Valaya are encrypted with AES-256. Only those who know your encryption password can decrypt your files. Your encryption password is not stored anywhere. Additionally, this system uses TLS to secure all communications between the client and server.Password StorageWe store your account passwords on our server securely using bcrypt. For security reasons, your passwords are not stored on your systems.Module DocumentationUsage ExampleHere's a basic example of how you can use thevalayamodule:importvalayapw='your_password'key_pw='your_encryption_password'# Gets values from the configuration fileip,port,usr=valaya.get_config().values()# Creates a user objectuser=valaya.User(ip,port,usr,pw,key_pw)# Uploads a file called 'image.png'user.upload('image.png')print('Upload Complete!')# Renames 'image.png' to 'logo.png'user.move('image.png','logo.png')# Lists all filesfiles=user.list_all()print(files)# Downloads 'logo.png' as 'logo_downloaded.png'user.download('logo.png','logo_downloaded.png')# Permanently deletes all filesforfileinfiles:user.remove(file,False)Getting StartedTo get started with thevalayamodule, import and create a user object:importvalayaip='valaya.io'port=4000user='your_username'pw='your_password'key_pw='your_encryption_password'user=valaya.User(ip,port,user,pw,key_pw)FunctionsUser.list(path='', stats=False)Returns a list of your files and folders in the specifiedpathon the cloud. Ifstatsis set toTrue, it will also include additional file details such as the date and time of upload, as well as the file size. If nopathis provided, it will list the files and folders in your current directory.User.list_all(stats=False)Returns a list of absolute paths for all your files stored on the cloud. Ifstatsis set toTrue, it will also include additional file details such as the date and time of upload, as well as the file size.User.current_dir()Returns the path of your current directory on the cloud.User.change_dir(path)Changes your current directory on the cloud to the specifiedpath(a string representing the new directory location).User.upload(src, dst=None, show_prog=True)Uploads a file or directory from your local filesystem to your cloud storage.src(str): The source path of the fle or directory on your local filesystem that you want to upload.dst(str): The destination path where the file or directory will be uploaded to on your cloud storage. If this parameter is not set, the file or directory will be uploaded into your current directory on the cloud.show_prog(bool): If set toTrue, a progress bar indicating the upload progress will be displayed during the upload process.User.download(src, dst=None, show_prog=True)Downloads a file or directory from your cloud storage to your local filesystem.src(str): The source path of the fle or directory on the cloud that you want to download.dst(str): The destination path where the file or directory will be downloaded to on your local filesystem. If this parameter is not set, the file or directory will be downloaded into your current directory.show_prog(bool): If set toTrue, a progress bar indicating the download progress will be displayed during the download process.User.move(src, dst)Moves a file or directory from a source location (src) to a destination location (dst). Both parameters are required to be set.User.remove(path, trash=True)Deletes a file or directory from the cloud.path(str): The path of the file or directory you wish to remove.trash(bool): Determines whether the file or directory will be moved to the trash (True) or permanently deleted (False). By default, the item will be moved to the trash.User.get_quota()Provides information about your storage usage. It returns a tuple with three integers:The total amount of storage you have used so far in bytes.The maximum amount of storage you have in bytes.The total amount of storage you have used so far in the day.valaya.get_config()Returns a dictionary with the contents of your configuration file.valaya.set_config(new_config)Sets the contents of your configuration file to the values ofnew_config(dict).ContributingGitHub Discussions:Discussionsare a great way to talk about features you want added or things that need clarification.GitHub Issues:Issuesare an excellent way to report bugs.