Futbol maçlarını haftalara bölen ve puan durumu hesaplayan profesyonel servis
Project description
Week Service
Futbol maçlarını haftalara bölen ve puan durumu tablolarını oluşturan yüksek performanslı servis.
🚀 Kurulum
pip install week-service
📋 Özellikler
- ⚡ Yüksek Performans: COPY komutu ile toplu veri işleme
- 📊 Haftalık Bölümleme: Maçları otomatik haftalara böler
- 🏆 Puan Durumu: Haftalık ve güncel puan durumlarını hesaplar
- 🔒 .env Desteği: Güvenli veritabanı yapılandırması
- 🎯 Esnek Filtreleme: Status bazlı akıllı filtreleme
⚙️ Yapılandırma
.env dosyası oluşturun:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=football_db
DB_USER=your_user
DB_PASSWORD=your_password
MIN_MATCHES=5
BATCH_SIZE=10
💻 Kullanım
CLI (Command Line)
# Güncel sezonları işle
week-service
# Tüm sezonları işle
week-service --all
# Minimum maç sayısı belirle
week-service --min-matches 10
# Test için limit koy
week-service --limit 50
Python Kodu
from week_service import WeekService
# Servis oluştur
service = WeekService()
# Tüm ligleri işle
service.process_all_leagues_bulk(
min_matches=5,
limit=None
)
📊 Veritabanı Tabloları
match_weeks
Maçların haftalık bölümlenmesi:
match_id,season_id,week_numberhome_team,away_team,statusmatch_date,match_time
weekly_standings
Haftalık puan durumları:
season_id,week_number,team_idposition,played,wins,draws,lossespoints,goals_for,goals_against
current_standings
Güncel puan durumları (son hafta)
📈 Performans
- 77,701 maç → 6 dakika
- 401 lig → Tek batch işlem
- 155,733 puan durumu → COPY ile toplu kayıt
🗂️ Proje Yapısı
week_service/
├── core/
│ ├── database.py # .env destekli DB bağlantısı
│ ├── match_loader.py # Maç yükleme
│ ├── week_divider.py # Hafta bölme
│ └── standings_calculator.py # Puan durumu
├── utils/
│ └── logger.py # Loglama
├── cli.py # CLI arayüzü
├── week_service.py # Ana servis
└── setup.py # PyPI paketi
📄 Lisans
MIT License
🤝 Katkıda Bulunma
Pull request'ler memnuniyetle karşılanır!
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 week_service-1.0.1.tar.gz.
File metadata
- Download URL: week_service-1.0.1.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2178bfb8397f5a8df5f46f73d7f8989fad35467e0ad7ff35989c09fa75e3de9c
|
|
| MD5 |
588189d5739e4b436f8f4fbbc4cfb6b1
|
|
| BLAKE2b-256 |
3f8674cbf44e7902248857cf9d77924a95dd8ba49cd9c65c6e020bf94c88b060
|
File details
Details for the file week_service-1.0.1-py3-none-any.whl.
File metadata
- Download URL: week_service-1.0.1-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
470397e7907a2bc607683e21e067c9a8fc921a3c8d29f33207cd2a97b54239c5
|
|
| MD5 |
11bc066f262750c3098dde9362abcc51
|
|
| BLAKE2b-256 |
04eb28dfb4f1e21f8c2674354b44f9d295948b4d0450d2a6a7135fe2c00836ce
|