Skip to main content

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_number
  • home_team, away_team, status
  • match_date, match_time

weekly_standings

Haftalık puan durumları:

  • season_id, week_number, team_id
  • position, played, wins, draws, losses
  • points, 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!

Metadata

Release files for week-service 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for week-service 1.0.0
File Size Uploaded Provenance Actions
week_service-1.0.0.tar.gz 10.0 kB Without provenance Details for week_service-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for week-service 1.0.0
File Interpreter ABI Platform Actions
week_service-1.0.0-py3-none-any.whl Python 3 none any Details for week_service-1.0.0-py3-none-any.whl

Total release size: 18.9 kB

Release files / week_service-1.0.0.tar.gz

Download URL week_service-1.0.0.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a05d5e96aac4c9fd2d831445f8e7a5cbe7617f069b227fb2ed62750d2d507739
BLAKE2b-256 checksum
How to use checksums
a3a5789916a53dd6b3d44f2c3ca044c82cfa28019a0f211c39162a592058ad41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / week_service-1.0.0-py3-none-any.whl

Download URL week_service-1.0.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7cce882b223ec186fd9a61eef72086c7aec552e84e5b9917a08995453eca70b4
BLAKE2b-256 checksum
How to use checksums
aa2f1129b2049c98ac2a4c3d70fff780c8e02dc1d59cb5977a13f2c1b853569a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for week-service 1.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page