Metadata-Version: 2.4
Name: pyfootix
Version: 0.3.2
Summary: Footix is a Python package for sports betting analysis and modeling, with a focus on football (soccer).
Project-URL: repository, https://github.com/SneachChea/footix
Author: sneachchea
License: MIT
License-File: LICENSE
Requires-Python: <3.15,>=3.12
Requires-Dist: cssselect<2,>=1.3.0
Requires-Dist: lxml<7,>=6.1.0
Requires-Dist: matplotlib<4,>=3.10.0
Requires-Dist: networkx<4,>=3.4.2
Requires-Dist: numpy<3,>=2.0.0
Requires-Dist: nutpie>=0.15
Requires-Dist: pymc<7,>=6.0
Requires-Dist: pytensor<4,>=3.0
Requires-Dist: pyyaml<7,>=6.0
Requires-Dist: rapidfuzz<4,>=3.0
Requires-Dist: requests<3,>=2.32.3
Requires-Dist: scikit-learn<2,>=1.2.2
Requires-Dist: scipy<2,>=1.10.1
Requires-Dist: torch<3,>=2.6.0
Requires-Dist: tqdm<5,>=4.65.0
Provides-Extra: gpu
Requires-Dist: triton; extra == 'gpu'
Description-Content-Type: text/markdown

<div align="center">
    <img src="img/logo_footix.png" alt="Footix Logo" width="200">
</div>

# 🐓 Footix: Smart Sports Analysis & Prediction Toolkit

[Features](#-features) • [Installation](#-installation) • [Quick Start](#-quick-start)

## 🎮 Overview

Footix is your intelligent companion for sports analysis and prediction. Leveraging advanced machine learning algorithms and comprehensive data analysis, it helps you make data-driven decisions in sports betting and analysis.

## ✨ Features

- 📊 **Advanced Data Analysis**
  - Import data from multiple sports databases
  - Clean and preprocess sports statistics
  - Comprehensive historical data analysis

- 🤖 **Smart Prediction Engine**
  - Machine learning-powered outcome prediction

- 💰 **Strategic Betting Tools**
  - Risk assessment algorithms
  - Bankroll management system
  - Multiple betting strategy templates

## 🚀 Installation

### CPU (default)

```bash
# uv (recommended) — CPU torch resolved automatically
uv add pyfootix

# pip — pass the PyTorch CPU index to avoid CUDA packages
pip install pyfootix --extra-index-url https://download.pytorch.org/whl/cpu
```

### GPU (Linux with CUDA)

```bash
# uv — override torch to use PyPI (includes CUDA on Linux)
uv add pyfootix --no-sources

# pip — standard PyPI install includes CUDA on Linux
pip install pyfootix
```

## 🎯 Quick Start

```python
from footix.models.bayesian import BayesianModel
from footix.data_io.footballdata import ScrapFootballData


# Load match data (example: Ligue 1 fixtures)
dataset = ScrapFootballData(competition="FRA Ligue 1", season="2024-2025", path ="./data", force_reload=True).get_fixtures()

# Initialize and fit the Bayesian model
model = BayesianModel(n_teams=18, n_goals=20)
model.fit(X_train=dataset)

# Predict probabilities for a specific match
probas = model.predict(home_team="Marseille", away_team="Lyon").return_probas()
print(f"Home: {probas[0]:.2f}, Draw: {probas[1]:.2f}, Away: {probas[2]:.2f}")
```

## 📤 Exporting Predictions

You can export Bayesian predictions to JSON using:

- Core Python utilities for script/automation workflows

See the full tutorial in [docs/source/prediction_export_tutorial.rst](docs/source/prediction_export_tutorial.rst).

## 📝 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
