Skip to content

Commit b424cd7

Browse files
Adicionada flake8 como dependência
close #12
1 parent 1381d99 commit b424cd7

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

Libpythonpro/__init__.py

Whitespace-only changes.

Libpythonpro/github_api.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import requests
2+
3+
4+
def buscar_avatar(usuario):
5+
"""
6+
Busca o avatar de um usuário no Github
7+
:Param usuário: str com o nome usuário no github
8+
:return: str com o link do avatar
9+
"""
10+
url = f'https://api.github.com/users/{usuario}'
11+
resp = requests.get(url)
12+
return resp.json()['avatar_url']
13+
14+
15+
if __name__ == '__main__':
16+
print(buscar_avatar('Carloshbfreire'))

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ Suportada versão 3 de Python Carlinhos
1616
Para instalar:
1717

1818
```console
19-
pip install pipenv
20-
pipenv install --dev
19+
python3 -m venv .venv
20+
source .venv/bin/activete
21+
pip install -r requirements-dev.txt
2122
```
2223

2324
Para conferir qualidade de código:
2425

2526
```console
26-
pipenv run flake8
27+
flake8
2728
```
2829

2930
Tópicos a serem abordados:

0 commit comments

Comments
 (0)