Projeto simples para calculo de frete, cubagem e peso real para transportadora Jadlog
Project description
jadlog
Projeto simples para calculo de frete, cubagem e peso real para transportadora Jadlog
Como usar
Antes de mais nada você precisa ter uma conta com a Jadlog http://www.jadlog.com.br/
Você vai precisar para calculo do frete e peso de cubagem:
- Cadastro/Contrato com a Jadlog
- Usuário (CNPJ)
- Senha
Instalando o pacote via pip
pip install jadlog
Instalando via git
git clone https://github.com/tiagocordeiro/jadlog.git
Como rodar o projeto (clonando via git)
- Clone esse repositório.
- Crie um virtualenv com Python 3.
- Ative o virtualenv.
- Instale as dependências.
git clone https://github.com/tiagocordeiro/jadlog.git
cd jadlog
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python contrib/env_gen.py
Alguns exemplos de uso
$ python
>>> from jadlog.calcula import peso_cubagem
>>> peso_cubagem(72, 44, 62)
{'Cubagem Expresso': 32.736, 'Cubagem Rodoviario': 58.93069306930693}
>>> from jadlog.calcula import frete_rodoviario
>>> frete_rodoviario(72, 44, 62, 27, '09220700', '48602575', 2450)
'273,75'
>>> from jadlog.calcula import frete
>>> frete(52, 24, 62, 10, '09220700', '09220-700', 2450)
{'frete': [{'expresso': '69,41'}, {'rodoviario': '81,51'}]}
>>>
Testes, contribuição e dependências de desenvolvimento
Para instalar as dependências de desenvolvimento
pip install -r requirements-dev.txt
Para rodar os testes
pytest -v --doctest-glob='*.md'
Para rodar os testes com relatório de cobertura.
coverage run manage.py test -v 2
coverage html
Verificando o Code style
pycodestyle .
flake8 .
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Project details
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
File details
Details for the file jadlog-0.1.0.tar.gz
.
File metadata
- Download URL: jadlog-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 022cb3a365ed5b300249f78fcc57cf6df590b960a7d23e28bf6ff045499bd2d0 |
|
MD5 | 807620ad4e5cc9273587b98f0556e192 |
|
BLAKE2b-256 | af69a8dedcfdf8a6d84328ae90c83cf2e7e2109d3f422e5665bafd0a41a0a49c |
File details
Details for the file jadlog-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: jadlog-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7db128840275586bfc79e3dde3ba007f863d223fc59455b8bb30ca43d9761bf2 |
|
MD5 | 7b2f4c08a9b3cd38dee0dce40c4eeeaf |
|
BLAKE2b-256 | a295e3c1658e4daa67eb116c8badb93cad2e78ed5507d1efa80ef60e4a0c6819 |