├── README.md ├── github.py ├── default.html └── templates └── index.html /README.md: -------------------------------------------------------------------------------- 1 | Github Finder Project with using Flask Framework, Github Rest Api and Python 2 | -------------------------------------------------------------------------------- /github.py: -------------------------------------------------------------------------------- 1 | from flask import Flask,render_template,request 2 | import requests 3 | app = Flask(__name__) 4 | base_url = "https://api.github.com/users/" 5 | 6 | @app.route("/",methods = ["GET","POST"]) 7 | def index(): 8 | if request.method == "POST": 9 | githubname = request.form.get("githubname") 10 | response_user = requests.get(base_url + githubname) 11 | response_repos = requests.get(base_url + githubname + "/repos") 12 | 13 | user_info = response_user.json() 14 | repos = response_repos.json() 15 | 16 | if "message" in user_info: 17 | return render_template("index.html",error = "Kullanıcı Bulunamadı...") 18 | else: 19 | 20 | return render_template("index.html",profile = user_info,repos = repos) 21 | else: 22 | return render_template("index.html") 23 | 24 | if __name__ == "__main__": 25 | app.run(debug = True) -------------------------------------------------------------------------------- /default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Github Finder 9 | 10 | 11 | 12 | 13 | 19 |
20 | 31 |
32 |
33 | 34 |
35 |
36 |
37 | 38 | Profili Görüntüle 39 |
40 |
41 | Repo Sayısı: 42 | Gist Sayısı: 43 | Takipçi: 44 | Takip Edilen: 45 |

46 |
    47 |
  • Şirket:
  • 48 |
  • Website/Blog:
  • 49 |
  • Yer:
  • 50 |
  • Ne zamandan beri üye:
  • 51 |
52 |
53 |
54 |
55 |

En son repolar

56 |
57 | 70 | 71 | 72 |
73 | 74 | 75 |
76 | 77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Github Finder 9 | 10 | 11 | 12 | 13 | 19 |
20 | 31 |
32 | {% if profile %} 33 |
34 | 35 |
36 |
37 |
38 | 39 | Profili Görüntüle 40 |
41 |
42 | Repo Sayısı: {{profile.public_repos}} 43 | Gist Sayısı: {{profile.public_gists}} 44 | Takipçi: {{profile.followers}} 45 | Takip Edilen: {{profile.following}} 46 |

47 |
    48 |
  • Şirket: {{profile.company}}
  • 49 |
  • Website/Blog:{{profile.blog}}
  • 50 |
  • Yer:{{profile.location}}
  • 51 |
  • Ne zamandan beri üye:{{profile.created_at}}
  • 52 |
53 |
54 |
55 |
56 |

En son repolar

57 |
58 | {% for repo in repos %} 59 |
60 |
61 |
62 | {{repo.name}} 63 | Repoya Git 64 |
65 |
66 | Yıldızlar: {{repo.stargazers_count}} 67 | İzleyiciler: {{repo.watchers}} 68 | Forklar:{{repo.forks}} 69 |
70 |
71 |
72 | {% endfor %} 73 | 74 | 75 | 76 | 77 |
78 | hr 79 | 80 |
81 | {% else %} 82 | 83 | {% if error %} 84 |
85 | {{error}} 86 |
87 | 88 | 89 | {% endif %} 90 | {% endif %} 91 | 92 | 93 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | --------------------------------------------------------------------------------