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
Metadata
Release files for libpythonpro-r 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| libpythonpro-r-0.4.tar.gz | 44.2 kB | Without provenance | Details for libpythonpro-r-0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| libpythonpro_r-0.4-py3-none-any.whl | Python 3 | none | any | Details for libpythonpro_r-0.4-py3-none-any.whl |
Total release size: 76.8 kB
Release files / libpythonpro-r-0.4.tar.gz
| Download URL | libpythonpro-r-0.4.tar.gz |
|---|---|
| Size | 44.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1508421717a4b382624356c372d6e899e71c6f27a8529a1055c176d277a155dc
|
|
BLAKE2b-256 checksum How to use checksums |
c35d2328705cd2bffe96f3ef822c77fb664df2c914dd18096592955b225eeae5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / libpythonpro_r-0.4-py3-none-any.whl
| Download URL | libpythonpro_r-0.4-py3-none-any.whl |
|---|---|
| Size | 32.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33ee9eed4ccc0e8df1f6fa727ecdb9667b4498d86cc15ae8d351f0ed19052f4c
|
|
BLAKE2b-256 checksum How to use checksums |
4a82772939d0393d2980035c644f89d506a906a998dc91a91bca641a2c954fc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for libpythonpro-r 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.