Skip to content

Commit

Permalink
Adicionada flake8 como dependência
Browse files Browse the repository at this point in the history
close #12
  • Loading branch information
Carloshbfreire committed Aug 22, 2022
1 parent 1381d99 commit b424cd7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
Empty file added Libpythonpro/__init__.py
Empty file.
16 changes: 16 additions & 0 deletions Libpythonpro/github_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import requests


def buscar_avatar(usuario):
"""
Busca o avatar de um usuário no Github
:Param usuário: str com o nome usuário no github
:return: str com o link do avatar
"""
url = f'https://api.github.com/users/{usuario}'
resp = requests.get(url)
return resp.json()['avatar_url']


if __name__ == '__main__':
print(buscar_avatar('Carloshbfreire'))
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ Suportada versão 3 de Python Carlinhos
Para instalar:

```console
pip install pipenv
pipenv install --dev
python3 -m venv .venv
source .venv/bin/activete
pip install -r requirements-dev.txt
```

Para conferir qualidade de código:

```console
pipenv run flake8
flake8
```

Tópicos a serem abordados:
Expand Down

0 comments on commit b424cd7

Please sign in to comment.