This Flask application provides two endpoints: one for generating circular avatars based on user data and another for searching users by name, email, and location.
- Clone this repository to your local machine.
- Install the required dependencies using pip:
pip install flask pillow
-
Run the Flask app:
python main.py -
Access the following endpoints:
-
Generate Avatar (POST):
/generate_avatar- Input: User name and gender (male, female, or unspecified)
- Output: Base64-encoded circular avatar image
-
Search Users (GET):
/search_users?q=<search_query>- Input: Query parameter (
q) for searching users - Output: List of matching user data
- Input: Query parameter (
-
-
Generate Avatar:
- POST request to
http://localhost:5000/generate_avatar - Form data:
name=John Doeandgender=male
- POST request to
-
Search Users:
- GET request to
http://localhost:5000/search_users?q=John - Returns users matching the query (by name, email, or location)
- GET request to
- Customize the avatar generation logic and user data as needed.
- Ensure proper error handling and validation in a production environment.
Feel free to enhance this README with additional details, deployment instructions, or any other relevant information. Good luck with your project! 😊
Note: The provided README is a starting point. You can expand it further by adding sections like "Deployment," "Contributing," "License," and any other relevant information specific to your project.