Módulo para exemplificar construção de projetos Python no curso PyTools
Project description
libpythonpro
Módulo para exemplificar construção de projetos Python no curso PyTools
Neste curso é ensinado como contribuir com o projeto de código aberto
Link do curso Python Pro
Suportada a versão 3.9.5 do Python
Para instalar:
# python3 -m venv .venv
# source .venv/bin/activate
# pip install -r requirements-dev.txt
Para conferir a qualidade do código:
# flake8
Tópicos a serem abordados:
- Git
- Virtualenv
- Pip
- Travis CI
- PyUp
- PyPI
- PyTest
- PyTest Coverage
- Code Coverage
- Pytest-Mock
- Pipenv
Bibliotecas de terceiros utilizadas:
Instalar o pacote 'libpythonpro' localmente:
# python3 -m venv .venv
# source .venv/bin/activate
# pip install -e ./libpythonpro/
Verificar a Instalação do pacote:
# pip freeze
Testar o pacote, utilizando a biblioteca 'github_api'
# python
Python 3.9.5 (default, May 11 2021, 08:20:37)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from libpythonpro.github_api import buscar_avatar
>>> buscar_avatar('ricardovezetiv')
>>> quit()
Criando a versão '0.1' do projeto 'libpythonpro' no 'Git'
# git tag 0.1
# git push --tags
Upload de pacote para o PyPI
# python setup.py sdist bdist_wheel
# pip install twine
# twine upload dist/*
Para instalar:
# python3 -m venv test
# source test/bin/activate
# pip install libpythonpro-r
# pip freeze
certifi==2021.5.30
charset-normalizer==2.0.3
idna==3.2
libpythonpro-r==0.1
requests==2.26.0
urllib3==1.26.6
Instalar o PyTest
# pip install pytest
Executar o PyTest via linha de comando:
# pytest libpythonpro/tests/
Instalar o PyTest Coverage
# pip install pytest-cov
Executar o PyTest com o Coverage
# pytest libpythonpro --cov=libpythonpro
Instalar o Pytest-Mock
# pip install pytest-mock
Instalar o Pipenv
# pip install pipenv
Comandos utilizados para integrar o projeto ao 'Pipenv'
# deactivate
# rm -Rf .venv
# pipenv install requests
# pipenv install --dev flake8 pytest coverage pytest-cov pytest-mock
# pipenv graph
# pipenv run flake8
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file libpythonpro-r-0.4.tar.gz.
File metadata
- Download URL: libpythonpro-r-0.4.tar.gz
- Upload date:
- Size: 44.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1508421717a4b382624356c372d6e899e71c6f27a8529a1055c176d277a155dc
|
|
| MD5 |
e18fbebf23a199c789d68ab652d54a13
|
|
| BLAKE2b-256 |
c35d2328705cd2bffe96f3ef822c77fb664df2c914dd18096592955b225eeae5
|
File details
Details for the file libpythonpro_r-0.4-py3-none-any.whl.
File metadata
- Download URL: libpythonpro_r-0.4-py3-none-any.whl
- Upload date:
- Size: 32.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33ee9eed4ccc0e8df1f6fa727ecdb9667b4498d86cc15ae8d351f0ed19052f4c
|
|
| MD5 |
e2cd8998109513154142d6f59f28d3a7
|
|
| BLAKE2b-256 |
4a82772939d0393d2980035c644f89d506a906a998dc91a91bca641a2c954fc5
|