Skip to main content

A Python package that allows you to view fuel prices in Turkey based on cities.

Project description

Python CI Workflow Status

Opet

Güncel yakıt fiyatlarını https://www.opet.com.tr/ üzerinden almanıza sağlar.

Kullanım

Aşağıdaki komut ile paketi kurabilirsiniz.

pip install opet

Projeyi isterseniz aşağıdaki şekilde bir kütüphane olarak kullanabilirsiniz, veya opet-cli üzerinden terminalden kullanabilirsiniz.

client = OpetApiClient()

print(client.get_provinces())
print(client.get_price("55"))

get_last_update

En son güncellemenin ne zaman olduğunu görebilirsiniz.

get_provinces

Sistemde yakıt fiyatlarını çekmek için kullanabileceğiniz il ve kodlarını getirir.

price

Parametre olarak vereceğiniz il kodu ile o ildeki yakıt fiyatlarına ulaşabilirsiniz.

opet-cli

Terminal üzerinden plaka kodu parametresi geçerek yakıt fiyatlarını json formatında görebilirsiniz.

opet-cli --il 34

Testing

Bu proje, kod kalitesini ve güvenilirliğini sağlamak amacıyla pytest kullanılarak yazılmış birim testleri içermektedir. Testler, kodda yapılan her değişiklikte ve main branch'ine yapılan pull request'lerde GitHub Actions aracılığıyla otomatik olarak çalıştırılır. Bu sayede projenin istikrarlı bir şekilde geliştirilmesi hedeflenmektedir.

Docker

Uygulamayı docker üzerinden kullanabilirsiniz. İsterseniz Dockerfile üzerinden şu komut ile kendiniz bir build alabilirsiniz.

docker build -t opet .

isterseniz de dockerhub üzerindeki imajı kullanabilirsiniz.

docker pull sinanerdinc/opet

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

opet-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opet-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file opet-0.1.0.tar.gz.

File metadata

  • Download URL: opet-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for opet-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2321cc4a902873bceed4955b3f83b862d81e4c1aa22949a23969e6159ad916c4
MD5 1d35bef1f80a46623f4a40ad6d0f249d
BLAKE2b-256 cae62f1e1ca943791025fc9c588c651377551dfd1845a7a541e9297edfeed971

See more details on using hashes here.

File details

Details for the file opet-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: opet-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for opet-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81627e7133cc7522f092f711ad2439b97462c833b6746c999687eb88c6d3730e
MD5 6504f42b55828ac4cf2ec1799d184487
BLAKE2b-256 5d892d713d5dcfa5d91c65b1d076fbca4d3ddd787afe89ed4ad544960a5b825b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page