PyRastreio
PyRastreio é uma biblioteca/cli para rastrear suas encomendas em alguns sistemas, criei ela só por que queria uma forma mais prática de ficar consultando minhas compras sem ter que ir nesses sistemas fazer todo o procedimento de consulta.
Sistemas
Instalação
$ pip install pyrastreio
obs. Se você vai instalar a biblioteca fora de um ambiente virtual, é recomendado usar a flag --user.
CLI
Você pode executar o CLI usando os comandos rastreio ou cade_minha_encomenda:
$ cade_minha_encomenda --help
Usage: cade_minha_encomenda [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
correios
jadlog
sequoia
Exemplos
Correios
$ rastreio correios CODIGO
+------------+--------+----------------+---------------------+
| data | hora | local | mensagem |
+============+========+================+=====================+
| 11/11/2011 | 11:11 | São Paulo / SP | descrição do evento |
+------------+--------+----------------+---------------------+
| 12/12/2011 | 12:12 | São Paulo / SP | descrição do evento |
+------------+--------+----------------+---------------------+
Jadlog
$ cade_minha_encomenda jadlog CODIGO
+--------------------+-----------------+---------------+-----------------+----------------+
| data/hora | origem | status | destino | documento |
+====================+=================+===============+=================+================+
| 11/11/2011 11:11 | CO SAO PAULO 01 | EMISSAO | CO SAO PAULO 02 | |
+--------------------+-----------------+---------------+-----------------+----------------+
| 12/12/2011 12:12 | CO SAO PAULO 02 | TRANSFERENCIA | CO SAO PAULO 03 | 11111111111111 |
+--------------------+-----------------+---------------+-----------------+----------------+
Sequoia
$ cade_minha_encomenda sequoia CODIGO CPF
+------------------+----------------------------+
| data/hora | status |
+==================+============================+
| 11/11/2011 11:11 | Recepção na transportadora |
+------------------+----------------------------+
| 12/12/2011 12:12 | Em transferência |
+------------------+----------------------------+
Biblioteca
A biblioteca implementa uma busca para cada sistema:
from pyrastreio import correios, jadlog, sequoia
print('Correios:')
print(correios('CODIGO_RASTREIO_CORREIOS'))
print('Jadlog:')
print(jadlog('CODIGO_RASTREIO_JADLOG'))
# sequoia precisa do cpf ou cnpj além do código de rastreio
print('Sequoia:')
print(sequoia('CODIGO_RASTREIO_SEQUOIA', '11111111111'))
Caso um código válido seja usado, essa deve ser a saída:
Correios:
[{"data": "11/11/2011", "hora": "11:11", local": "São Paulo / SP", "mensagem": "descrição do evento"}]
Jadlog:
[{"data/hora": "11/11/2011 11:11", "origem": "CO SAO PAULO", "status": "EMISSAO", "destino": "CO SAO PAULO 02", "documento": "11111111111111"}]
Sequoia:
[{"data/hora": "11/11/2011", "status": "Recepção na transportadora"}]
Metadata
Release files for pyrastreio 0.2.0
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 |
|---|---|---|---|---|
| pyrastreio-0.2.0.tar.gz | 3.8 kB | Without provenance | Details for pyrastreio-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyrastreio-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pyrastreio-0.2.0-py3-none-any.whl |
Total release size: 8.8 kB
Release files / pyrastreio-0.2.0.tar.gz
| Download URL | pyrastreio-0.2.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f561ff0185a727eb9e8d8d1b71e819f7d642a1ed9b765a02f27a8a2ea77793f
|
|
BLAKE2b-256 checksum How to use checksums |
e7454399a52a0ef1cdb2fe40548fe34fa2a2ad230dc0235ceeeb4d9aad20e1c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.3
|
Release files / pyrastreio-0.2.0-py3-none-any.whl
| Download URL | pyrastreio-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
687d871e850bb46eed45791a3e751a4f2c9da761e0f6baec49df17c7efc9bd8f
|
|
BLAKE2b-256 checksum How to use checksums |
3cf0cdc57429287d644d3d640ddd3f1cc44a980dc8de002ed0976fb066c2a2a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.3
|
Security for pyrastreio 0.2.0
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.