İzmir Open Data · Python İstemcisi
İzmir Büyükşehir Belediyesi Açık Veri Portalı ve Open API servisleri için modern, asenkron ve tip güvenli (Pydantic) Python istemcisi.
🚀 Özellikler
- Tam Asenkron Destek:
httpxaltyapısı ile non-blocking, yüksek performanslı istekler. - %100 Tip Güvenliği: API yanıtları Pydantic V2 modellerine dönüştürülür, IDE'lerde otomatik tamamlama (autocompletion) desteği sunar.
- Kapsamlı Kapsama Alanı: ESHOT, İZBAN, Metro, Vapur, BİSİM, İZSU, Otopark, Etkinlikler, Hal Fiyatları ve daha birçok servisi kapsayan ~150 endpoint desteği.
- CLI (Komut Satırı) Aracı: Terminal üzerinden doğrudan açık veriye erişebilme imkanı.
- Model Context Protocol (MCP): AI ajanlarının (Claude, vb.) doğrudan açık veriyi sorgulayabilmesi için hazır bir MCP sunucusu.
📦 Kurulum
Şu anda paket kaynak koddan yüklenebilmektedir (ileride PyPI'a eklenebilir):
# Repoyu klonlayın
git clone https://github.com/AtaCanYmc/izmir-open-data-py.git
cd izmir-open-data-py
# pip ile (tercihen sanal ortamda) kurun
pip install -e .
📖 Temel Kullanım
import asyncio
from izmir_open_data import IzmirClient
async def main():
async with IzmirClient() as client:
# BİSİM İstasyonları ve Boş Bisiklet Durumları
istasyonlar = await client.bisim.get_istasyon_list()
for ist = istasyonlar.kayitlar[:3]:
print(f"İstasyon: {ist.adi} | Boş Bisiklet: {ist.bos_bisiklet_sayisi}")
# Otopark Doluluk Oranları
otoparklar = await client.otopark.get_list()
for oto in otoparklar[:3]:
print(f"Otopark: {oto.name} | Boş Yer: {oto.occupancy.total.free}")
if __name__ == "__main__":
asyncio.run(main())
Daha detaylı istemci mimarisi ve namespace yapıları için İstemci (Client) Dokümantasyonuna (docs/CLIENT.md) göz atın.
💻 CLI (Komut Satırı) Aracı
Terminal üzerinden herhangi bir script yazmadan İzmir verilerine ulaşabilirsiniz.
# Yardım menüsü
izmir-data --help
# İstediğiniz veri setini çekmek (örn: afet toplanma alanları)
izmir-data get cbs/afetaciltoplanmaalani
🤖 MCP (Model Context Protocol) Sunucusu
Proje entegre bir MCP sunucusuyla gelmektedir. Yapay zeka ajanlarına izmir verilerini öğretmek isterseniz:
# FastMCP sunucusunu başlatın
izmir-mcp dev
Yapay zeka asistanları (Örn. Claude), bu sunucuya bağlandıklarında sistemdeki tüm API'leri kendi başlarına tarayabilir ve sorularınızı gerçek zamanlı verilerle cevaplayabilir.
MCP sunucusunun yetenekleri, LLM araçları ve Claude Desktop entegrasyonu için detaylı MCP Dokümantasyonuna (docs/MCP.md) göz atın.
🧪 Testler ve Geliştirme
Proje kod kalitesini sağlamak için ruff, mypy ve pre-commit kullanmaktadır. Canlı endpoint testleri pytest ile yazılmıştır:
# Canlı veritabanına bağlanıp 150 endpointin anlık durumunu test edin
pytest tests/test_live_endpoints.py -v
📄 Lisans
Bu proje MIT Lisansı ile lisanslanmıştır. Kullanılan veriler İzmir Büyükşehir Belediyesi Açık Veri Portalı ve Açık Kaynak Kodlu API üzerinden sağlanmaktadır.
Metadata
Release files for izmir-open-data-py 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| izmir_open_data_py-0.1.0.tar.gz | 25.1 kB | With provenance | Details for izmir_open_data_py-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| izmir_open_data_py-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for izmir_open_data_py-0.1.0-py3-none-any.whl |
Total release size: 60.3 kB
Release files / izmir_open_data_py-0.1.0.tar.gz
| Download URL | izmir_open_data_py-0.1.0.tar.gz |
|---|---|
| Size | 25.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa3c655fcb66a4e797460778e233210f17ca77c253d2f2784fda00d21b4f3f85
|
|
BLAKE2b-256 checksum How to use checksums |
9d90deec1361b0d8c051b2543aaa423aecea921685bc84a57792d429237a0fd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logRelease files / izmir_open_data_py-0.1.0-py3-none-any.whl
| Download URL | izmir_open_data_py-0.1.0-py3-none-any.whl |
|---|---|
| Size | 35.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33512cd414467078cb9640c49011e8d18075d067882b8f209552faa71b83f731
|
|
BLAKE2b-256 checksum How to use checksums |
f88ba18a65ab441ce2564edf8f1c10126aa50790ddb2148ded06fa3b99e12270
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logSecurity for izmir-open-data-py 0.1.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for izmir_open_data_py-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logA 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.