Skip to main content

LME

Cotação London Metal Exchange

Deploy workflow Build Status Updates Python 3 codecov GitHub

Instalando o pacote via pip

$ pip install lme

Instalando via git

$ git clone https://github.com/tiagocordeiro/lme.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/lme.git
cd lme
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python contrib/env_gen.py

Utilizando o pacote no terminal

$ python lme/prices.py 
╔═════════════════════════════════╦════════════════════╦═════════════════╗
║ Semana do ano: 07               ║ Início: 17-02-2020 ║ Fim: 21-02-2020 ║
╚═════════════════════════════════╩════════════════════╩═════════════════╝
             Cobre   Zinco  Aluminio  Chumbo  Estanho   Niquel   Dolar
Data                                                                  
2020-02-17  5802.0  2153.5    1678.5  1911.0  16630.0  13070.0  4.3157
2020-02-18  5728.0  2128.0    1681.0  1901.0  16520.0  12880.0  4.3471
2020-02-19  5745.5  2126.5    1686.0  1920.0  16550.0  12700.0  4.3728
2020-02-20  5730.0  2100.0    1687.0  1939.0  16600.0  12685.0  4.3873
2020-02-21  5702.0  2086.5    1677.0  1881.0  16525.0  12440.0  4.3924
═════════════════════════════════════════════════════════════════════════
             Cobre   Zinco  Aluminio  Chumbo  Estanho   Niquel    Dolar
Média:      5741.5  2118.9    1681.9  1910.4  16565.0  12755.0  4.36306

Python console

>>> from lme.prices import last_weeks
>>> last_weeks(2)
...
╔═════════════════════════════════╦════════════════════╦═════════════════╗
║ Semana do ano: 07               ║ Início: 17-02-2020 ║ Fim: 21-02-2020 ║
╚═════════════════════════════════╩════════════════════╩═════════════════╝
             Cobre   Zinco  Aluminio  Chumbo  Estanho   Niquel   Dolar
Data                                                                  
2020-02-17  5802.0  2153.5    1678.5  1911.0  16630.0  13070.0  4.3157
2020-02-18  5728.0  2128.0    1681.0  1901.0  16520.0  12880.0  4.3471
2020-02-19  5745.5  2126.5    1686.0  1920.0  16550.0  12700.0  4.3728
2020-02-20  5730.0  2100.0    1687.0  1939.0  16600.0  12685.0  4.3873
2020-02-21  5702.0  2086.5    1677.0  1881.0  16525.0  12440.0  4.3924
═════════════════════════════════════════════════════════════════════════
             Cobre   Zinco  Aluminio  Chumbo  Estanho   Niquel    Dolar
Média:      5741.5  2118.9    1681.9  1910.4  16565.0  12755.0  4.36306

Testes, contribuição e dependências de desenvolvimento

Para instalar as dependências de desenvolvimento

pip install -r requirements-dev.txt

Banco de dados para desenvolvimento com Docker

docker-compose up -d

Para rodar os testes

pytest

Para criar um relatório de cobertura de testes.

coverage run -m pytest -v
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

MIT

Metadata

Release files for lme 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lme 0.5.2
File Size Uploaded Provenance Actions
lme-0.5.2.tar.gz 6.2 kB Without provenance Details for lme-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lme 0.5.2
File Interpreter ABI Platform Actions
lme-0.5.2-py3-none-any.whl Python 3 none any Details for lme-0.5.2-py3-none-any.whl

Total release size: 10.8 kB

Release files / lme-0.5.2.tar.gz

Download URL lme-0.5.2.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0107f1e1310203aa5370994b2642967d35583cc8eaa935a6ff6a35273ccad662
BLAKE2b-256 checksum
How to use checksums
5509eb4ce055147fb34d8c834530cbc6720075b9baa4ac380cdddd89616eec48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / lme-0.5.2-py3-none-any.whl

Download URL lme-0.5.2-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc9ac3bab25267c5d6783fc5a5cb904547a6f440e782cbd833b6a938c1e188b6
BLAKE2b-256 checksum
How to use checksums
5610b2f319ae281a8b40ddb9fde6653f13ea86cc057bde7820fff3d1e5fb3955
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Security for lme 0.5.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page