TRApi resmi Python istemcisi — Türkiye'ye özel API'ler | Official Python client for TRApi — Turkey-specific REST APIs (phone, TCMB, calendar, IBAN, company, Islamic)
Project description
trapi-client
TRApi resmi Python istemcisi. Official Python client for TRApi.
Türkiye'ye özel REST API'leri: telefon doğrulama, TCMB döviz kuru ve altın fiyatları, iş takvimi, şirket sorgulama, IBAN/BIN/TCKN doğrulama, İslami servisler.
Turkey-specific REST APIs: phone validation, TCMB exchange rates & gold prices, business calendar, company lookup, IBAN/BIN/TCKN validation, Islamic services.
Kurulum / Install
pip install trapi-client
Python 3.10+ gereklidir. httpx üzerine kuruludur.
Requires Python 3.10+. Built on httpx.
Hızlı Başlangıç / Quick Start
RapidAPI (önerilen / recommended)
import os
from trapi_client import TRApiClient
client = TRApiClient(
rapid_api_key=os.environ["RAPIDAPI_KEY"],
rapid_api_host="turkey-business-calendar-api.p.rapidapi.com",
)
# Telefon doğrulama / Phone validation
print(client.phone_validate("05301234567"))
Doğrudan Erişim / Direct Access (trapi.tr)
client = TRApiClient(proxy_secret=os.environ["TRAPI_PROXY_SECRET"])
Örnek Çağrılar / Example Calls
# Döviz kurları / Exchange rates
client.market_exchange_rates(lang="tr")
# IBAN doğrulama / IBAN validation
client.finance_validate_iban("TR330006100519786457841326")
# İş günü kontrolü / Business day check
client.calendar_is_business_day("2026-04-14")
# Namaz vakitleri / Prayer times
client.islamic_prayer_times("Istanbul", lang="tr")
# Altın fiyatları / Gold prices
client.market_gold_prices()
# Şirket VKN sorgulama / Company VKN lookup
client.company_vkn_lookup("1234567890")
# Resmi tatiller / Public holidays
client.calendar_holidays(2026)
# Telefon operatör tespiti / Operator detection
client.phone_operator("05301234567")
Mevcut Metodlar / Available Methods
| Metod / Method | Açıklama / Description |
|---|---|
| Telefon / Phone | |
phone_validate(number) |
Numara doğrulama / Number validation |
phone_operator(number) |
Operatör tespiti / Operator detection |
phone_format(number) |
Formatlama / Formatting |
phone_city(number) |
Şehir tespiti / City lookup |
| Piyasa / Market | |
market_exchange_rates() |
TCMB döviz kurları / TCMB exchange rates |
market_exchange_rate(currency) |
Tek döviz kuru / Single exchange rate |
market_gold_prices() |
Altın fiyatları / Gold prices |
market_convert(amount, source, target) |
Döviz çevirici / Currency converter |
| Finans / Finance | |
finance_validate_iban(iban) |
IBAN doğrulama / IBAN validation |
finance_lookup_bin(bin_number) |
BIN sorgulama / BIN lookup |
finance_validate_tckn(tckn) |
TC Kimlik doğrulama / Identity validation |
finance_validate_vkn(vkn) |
Vergi kimlik doğrulama / Tax ID validation |
| Şirket / Company | |
company_vkn_lookup(vkn) |
VKN ile şirket sorgulama / Company lookup by VKN |
company_tax_offices(city) |
Vergi daireleri / Tax offices |
| Takvim / Calendar | |
calendar_holidays(year) |
Resmi tatiller / Public holidays |
calendar_is_business_day(date) |
İş günü mü? / Is it a business day? |
calendar_business_days(start, end) |
İş günleri / Business days |
calendar_next_business_day(date) |
Sonraki iş günü / Next business day |
calendar_bist_trading_days(year) |
BIST işlem günleri / BIST trading days |
| İslami / Islamic | |
islamic_prayer_times(city) |
Namaz vakitleri (Diyanet) / Prayer times |
islamic_locations_cities() |
Şehir listesi / City list |
islamic_hijri_today() |
Bugünün Hicri tarihi / Today's Hijri date |
islamic_quran_random() |
Rastgele ayet / Random verse |
Tüm metodlar opsiyonel lang parametresi kabul eder ("tr" veya "en").
All methods accept an optional lang parameter ("tr" or "en").
Lisans / License
MIT
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trapi_client-1.0.0.tar.gz.
File metadata
- Download URL: trapi_client-1.0.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf03157e16a3fc2186c365dd6edc8dbebc4ab8cbbfd2327f61f30337cdd31740
|
|
| MD5 |
ed02120ff69a4f5187b447d80191d749
|
|
| BLAKE2b-256 |
1b28135ec701f48969f81fcc828398aad7aae6dca89401c2de5e5a71ad9c87f2
|
File details
Details for the file trapi_client-1.0.0-py3-none-any.whl.
File metadata
- Download URL: trapi_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91d264ade2cabeb9bd58d7af3b409db430d3e534488385d5b552b44627863e43
|
|
| MD5 |
807cfde1d2d3b921e4583d1d38c812ef
|
|
| BLAKE2b-256 |
a14721fbc7a706ab0e1f83b556d615a816a2b4586744cc97c8ba800084977251
|