A Python-based file distribution tool designed for efficient and secure file transfer and communication between clients and a server.
- Clone or download the repository
- Ensure you have Python3 installed. Create and activate a virtual environment inside the project directory. Install the required packages listed in
r.txt.cd project_directory virtualenv venv source venv/bin/activate pip install -r r.txt - we can generate dummy data for the database for testing purposes.To do so, run
db.pyfile once.cd server python3 db.py - Start the server.
cd server python3 server.py - Start the client. We can run multiple clients and authenticate them with different credentials.
cd client python3 client.py
list-groups: gives the list of all groups availablejoin-group {group_name}: request to join group with name group_name, eg.join-group group1my-groups: to get the list of groups they're already part of
create-group group_name: to create a group with name group_namedelete-group group_name: to delete the group with name group_name, if existslist-users: to get the list of all users' emailsview-requests: to see all the pending group joining requestsadd user_email group_name: to add this particular user to the group named group_nameremove user_email group_name: to remove this particular user from the group named group_nameclear-requests: reject all the pending requestsinit filename group1 group2 ...: to initialize sending file named filename to all the users who belong to atleast one of the listed group names
- We have generated an admin with 'admin' as both email and password.
- Also, we generated 10 users with their emails as user1@gmail.com, user2@gmail.com, etc. And their respective passwords are user1, user2, etc.
- We also have 5 groups with names group1, group2, and so on. 2 users are assigned to each group.