Git Product home page Git Product logo

dovizkurlari's Introduction

Doviz Kurlari

Türkiye Cumhuriyeti Merkez Bankası sitesinden XML olarak verileri alarak kullanmanızı sağlayacak Python kodu (nesnesi)'dir.

Bilginin Alındığı Sayfa : www.tcmb.gov.tr - http://www.tcmb.gov.tr/kurlar/today.xml

Kullanımı :

sistemden zip'li olarak çekin veya "git clone" ile direk sistemden clone yapın.

git clone https://github.com/tayfunulu/DovizKurlari.git

cd DovizKurlari

python ornek.py

veya

python3 ornek.py

Kendi kodunuzda kullanmak için DovizKurlari.py dosyasını kendi projenizin klasörünüze taşıyın. Sonrasında DovizKurları Nesnesi yaratarak, DegerSor fonksiyonu ile istediğiniz değeri sistemden çekebilirsiniz. "DegerSor" fonksiyonu iki parametre alır.

DegerSor (Parametre1, Parametre2)

Parametre1 = USD, EUR, AUD gibi para cinsinin resmi kısaltmaları

Parametre2 = Almak istediğiniz değer ;

  0 : Kod kısaltmasını verir. 
  1 : Türkçe tanım . "ABD DOLARI" gibi. 
  2 : Yabancı tanım = CurrencyName 
  3 : Birim değeri = Genelde 1 olur. Bazı para cinsleri için 100'dür. 
  4 : Döviz Alış Değeri = Forex Buying 
  5 : Döviz Satış Değeri = Forex Selling
  6 : Efektif Alış Değeri = Banknote Buying
  7 : Efektif Satış Değeri = Banknote Selling 
  8 : Dolar ile çapraz parite 

Arşivden veri çekmek

Eski bir tarihteki kur'u ögrenmek için Arsiv veya Arsiv_Tarih fonksiyonlarını kullanabilirsiniz.

Arsiv (Parametre1, Parametre2, Gun, Ay, Yil)

Gun, Ay, Yil = integer veya string olabilir.

Arsiv_Tarih (Parametre1, Parametre2, Tarih)

Tarih = "01.02.2015" Şeklinde bir string veri olmalıdır.

Ornek Python Kodu :

from DovizKurlari import DovizKurlari

ornek = DovizKurlari()

print ("Bugunun Kurlar : ")

print ("EURO DEGERI="+ornek.DegerSor("EUR",4))

Dolar_Deger = ornek.DegerSor("USD",4)

print ("DOLAR DEGERI="+Dolar_Deger)

print ("\nArsiv'deki bir degere bakalim. 10.02.2015")

print ("EURO DEGERI="+ornek.Arsiv("EUR",4,10,2,2015))

Dolar_Deger = ornek.Arsiv("USD",4,10,2,2015)

print ("DOLAR DEGERI="+Dolar_Deger)

print ("\nArsiv'deki bir degere bakalim. 27.03.2014")

print ("EURO DEGERI="+ornek.Arsiv_tarih("EUR",4,"27.03.2014"))

Dolar_Deger = ornek.Arsiv_tarih("USD",4,"27.03.2014")

print ("DOLAR DEGERI="+Dolar_Deger)

dovizkurlari's People

Contributors

tayfunulu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.