Skip to main content

A secure and customizable cloud storage system built with an open source client.

Project description

Valaya

Valaya 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 Run

To install Valaya, open a terminal and complete the following steps.

  1. Install with pip:
pip install valaya
  1. Create an account. (Replace your_email with your email address):
valaya -su your_email
  1. Launch the Valaya command line interface:
valaya

Done! Now you can access 15 GB of cloud storage.


Valaya Command Line Interface

The Valaya command line interface (VCLI) provides a simple and efficient way to interact with Valaya directly from a terminal.

Launch

To launch the VCLI, open a terminal and run the following command:

valaya

All other commands and options:

Command (from terminal) Description
valaya Launch the VCLI.
valaya -si Sign in.
valaya -su Sign up.
valaya -pw Change your password.

VCLI Commands

All commands availible in the VCLI:

Command (from VCLI) Description
ul 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.
  • -l Use a long listing format. (Additionally shows file size and time of upload.)
cd [directory] Change to a different directory.
mv old_path new_path Move 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] path Move a file or directory into the trash folder.
  • -f Permanently delete a file or directory.
quota [-l] Show how much total and daily storage is left.
  • -l Use a long format. (Shows storage in bytes.)
pwd Show the current directory.
q Quit the interface.

Privacy and Security

Encryption

All 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 Storage

We store your account passwords on our server securely using bcrypt. For security reasons, your passwords are not stored on your systems.


Module Documentation

Usage Example

Here's a basic example of how you can use the valaya module:

import valaya

pw = 'your_password'
key_pw = 'your_encryption_password'

# Gets values from the configuration file
ip, port, usr = valaya.get_config().values()

# Creates a user object
user = 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 files
files = user.list_all()
print(files)

# Downloads 'logo.png' as 'logo_downloaded.png'
user.download('logo.png', 'logo_downloaded.png')

# Permanently deletes all files
for file in files:
    user.remove(file, False)

Getting Started

To get started with the valaya module, import and create a user object:

import valaya

ip = 'valaya.io'
port = 4000
user = 'your_username'
pw = 'your_password'
key_pw = 'your_encryption_password'

user = valaya.User(ip, port, user, pw, key_pw)

Functions

User.list(path='', stats=False)

Returns a list of your files and folders in the specified path on the cloud. If stats is set to True, it will also include additional file details such as the date and time of upload, as well as the file size. If no path is 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. If stats is set to True, 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 specified path (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 to True, 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 to True, 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:

  1. The total amount of storage you have used so far in bytes.
  2. The maximum amount of storage you have in bytes.
  3. 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 of new_config (dict).


Contributing

  • GitHub Discussions: Discussions are a great way to talk about features you want added or things that need clarification.
  • GitHub Issues: Issues are an excellent way to report bugs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

valaya-1.0.0a0.tar.gz (54.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

valaya-1.0.0a0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file valaya-1.0.0a0.tar.gz.

File metadata

  • Download URL: valaya-1.0.0a0.tar.gz
  • Upload date:
  • Size: 54.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for valaya-1.0.0a0.tar.gz
Algorithm Hash digest
SHA256 66cb1d32fd6d61ec420cc45ccb1d51bff4f7ee58a434d9443104d5ce49d413cc
MD5 aa7b2271d7c6da85916e38906b7e1f0a
BLAKE2b-256 02a4e15bbd17059f2fc7cf0138abe2143eb9c1a99c39230d4bad81eb944e0302

See more details on using hashes here.

File details

Details for the file valaya-1.0.0a0-py3-none-any.whl.

File metadata

  • Download URL: valaya-1.0.0a0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for valaya-1.0.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 fce5d57245634bb4dcbf05d81a78f593babeddb85ca226abd481eb6a8b5518d7
MD5 8516eb3368a2123c6b5d3a48fa67cf25
BLAKE2b-256 1b93127bd4cf533d9b2207a14f3b57264ee91e2199a0968506dcffa33c6cd894

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page