A REST API made w/ Django which generates a csv formatted response of user information retrieved from given search query parameters as input.
- Python 3.10
- Django 4.1.3
GET /user/?keyword={}&location={}&followers={}&repos={}&language={}
Parameter | Type | Description |
---|---|---|
keyword |
string |
Name, Keyword in Bio of the user |
location |
string |
Location of the user |
followers |
string |
No. of followers of user | Ex: >10, <30 |
repos |
string |
No. of public repositories | Ex: >4, <60 |
language |
string |
Most used programming language by the user |
Atleast one of the following parameters is Required for a successful request
github-user-search-api.azurewebsites.net/user/
Example Query: user/?keyword=hackathon&location=india&followers=>2&repos=>5&language=python
Result for the above query can be seen in the file user_info.csv
- Processes input parameters (keyword, location etc. of user) to search users, then from the search result retrieves the user info(name, email etc.) of all users using the GitHub API.
- Implemented multi-threading to make multiple http requests concurrently which increases the speed of the program significantly
Clone the project
git clone https://github.com/rogdex24/github-user-search-api.git
Go to the project directory
cd github-user-search-api
Create a virtual environment
python -m venv .venv
Activate the virtual environment
. .venv/Scripts/activate
Add the environment variables: (create the '.env' file and add the variables)
GITHUB_PAT=<YourGithubPAT>
Install the dependencies:
pip install -r requirements.txt
Create a superuser
python manage.py createsuperuser
Migrate the databse
python manage.py migrate
Run the Server
python manage.py runserver