From 073dce27697d1f3f16638145e7aaab816d1de5bd Mon Sep 17 00:00:00 2001 From: Leal Date: Sun, 21 Nov 2021 15:23:49 -0300 Subject: [PATCH 1/4] Adicionando dependencia --- libpythonpro/github_api.py | 10 +++++++--- requirements-dev.txt | Bin 0 -> 174 bytes requirements.txt | Bin 0 -> 184 bytes 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 requirements-dev.txt create mode 100644 requirements.txt diff --git a/libpythonpro/github_api.py b/libpythonpro/github_api.py index 8b0fbafb9..b701dd67a 100644 --- a/libpythonpro/github_api.py +++ b/libpythonpro/github_api.py @@ -1,13 +1,17 @@ import requests -def buscar_avatar(usuario): + +def buscar_avatar(Adrand): """ Busca o avatar de um usuário no Github - :param usuario: str com o nome de usuário no github :return: str com o link do avatar """ - url = f'https://api.github.com/users/{usuario}' + url = f'https://api.github.com/users/{Adrand}' resp = requests.get(url) return resp.json()['avatar_url'] + + +if __name__ == '__main__': + print(buscar_avatar('Adrand')) \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000000000000000000000000000000000000..0ea958ea4b99b755fd2eb9cea0dd10a34f04dc79 GIT binary patch literal 174 zcmYL?TMC0f6hqIq&^@>T#fr%MxEQq-icVi+p>AHAJ1v$=;D!^DZ9Oy5GBV(3bQL*; zbmTySr`NS~;zo_sJH4}r-Z+T{X1VE?E0u9l5nC+x-wCnF65lP`$#{}V0}ozY;^*bA KY7I)xyrmDyuN)}= literal 0 HcmV?d00001 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..fa3bbaef330592b63df864e323e273233bac7904 GIT binary patch literal 184 zcmXYr!3x4a3MU zS=oMI&5D*AjbxD@+3?`$ba&UAdxvF7r%2V2>Nra_;jMI4u^pseO!lIy{I4dj?qzZ? RllDH`CsVU|{?S6z`~XY!9A*Fj literal 0 HcmV?d00001 From 0887d4762d560f46df108200f84275960ee5d60b Mon Sep 17 00:00:00 2001 From: Leal Date: Sun, 21 Nov 2021 15:24:01 -0300 Subject: [PATCH 2/4] Adicionando dependencia --- .idea/.gitignore | 8 ++++++++ .idea/inspectionProfiles/Project_Default.xml | 17 +++++++++++++++++ .idea/inspectionProfiles/profiles_settings.xml | 6 ++++++ .idea/libpythonpro.iml | 15 +++++++++++++++ .idea/misc.xml | 4 ++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ 7 files changed, 64 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/libpythonpro.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..13566b81b --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 000000000..b8ef0facf --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 000000000..105ce2da2 --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/libpythonpro.iml b/.idea/libpythonpro.iml new file mode 100644 index 000000000..86055dcc4 --- /dev/null +++ b/.idea/libpythonpro.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 000000000..d56657add --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..3478ad2cf --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..94a25f7f4 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From e2adce2d16b9a01903f5c0c352fdee3d535608aa Mon Sep 17 00:00:00 2001 From: Leal Date: Fri, 10 Dec 2021 21:55:14 -0300 Subject: [PATCH 3/4] atualizando para usar no linux --- .travis.yml | 3 ++- setup.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6694375b7..7a193200a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ language: python python: - - 3.7 + - 3.9 install: + - pip install -r requirements-dev.txt - pip install -q pipenv codecov - pipenv sync --dev script: diff --git a/setup.py b/setup.py index 1fea97a65..b2755fe40 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def find_package_data( long_description_content_type='text/markdown', author=AUTHOR, author_email=AUTHOR_EMAIL, - license="GNU AFFERO GENERAL PUBLIC LICENSE", + license=read('LICENSE'), url=URL, packages=find_packages(exclude=["tests.*", "tests"]), package_data=find_package_data(PACKAGE, only_in_packages=False), @@ -128,7 +128,7 @@ def find_package_data( "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.9", "Framework :: Pytest", ], install_requires=[ From 38ab8e316aa3e75d0505401558df895311087462 Mon Sep 17 00:00:00 2001 From: Leal Date: Fri, 10 Dec 2021 21:55:14 -0300 Subject: [PATCH 4/4] atualizando para usar no linux --- .travis.yml | 3 ++- setup.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6694375b7..7a193200a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ language: python python: - - 3.7 + - 3.9 install: + - pip install -r requirements-dev.txt - pip install -q pipenv codecov - pipenv sync --dev script: diff --git a/setup.py b/setup.py index 1fea97a65..b2755fe40 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def find_package_data( long_description_content_type='text/markdown', author=AUTHOR, author_email=AUTHOR_EMAIL, - license="GNU AFFERO GENERAL PUBLIC LICENSE", + license=read('LICENSE'), url=URL, packages=find_packages(exclude=["tests.*", "tests"]), package_data=find_package_data(PACKAGE, only_in_packages=False), @@ -128,7 +128,7 @@ def find_package_data( "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.9", "Framework :: Pytest", ], install_requires=[