Get up-to-date lottery draws from FDJ
Project description
frenchlottery
Simple Python package to retrieve lottery data from FDJ website into a Polars DataFrame.
Installation
pip install frenchlottery or uv add frenchlottery
Usage
From the command line (activated env with lottery installed)
- French lottery (default) with last 5 draws:
python -m frenchlottery --source=loto -n=5┌────────────┬─────┬─────┬─────┬─────┬─────┬─────┐ │ date ┆ b1 ┆ b2 ┆ b3 ┆ b4 ┆ b5 ┆ e1 │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ date ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 │ ╞════════════╪═════╪═════╪═════╪═════╪═════╪═════╡ │ 2026-01-21 ┆ 40 ┆ 25 ┆ 29 ┆ 27 ┆ 45 ┆ 10 │ │ 2026-01-24 ┆ 30 ┆ 39 ┆ 10 ┆ 33 ┆ 18 ┆ 8 │ │ 2026-01-26 ┆ 25 ┆ 32 ┆ 28 ┆ 9 ┆ 36 ┆ 4 │ │ 2026-01-28 ┆ 42 ┆ 7 ┆ 11 ┆ 30 ┆ 10 ┆ 4 │ │ 2026-01-31 ┆ 24 ┆ 14 ┆ 4 ┆ 1 ┆ 21 ┆ 4 │ └────────────┴─────┴─────┴─────┴─────┴─────┴─────┘ - Euromillions lottery with last 10 draws:
python -m frenchlottery source=euro -n=10┌────────────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │ date ┆ b1 ┆ b2 ┆ b3 ┆ b4 ┆ b5 ┆ e1 ┆ e2 │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ date ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 │ ╞════════════╪═════╪═════╪═════╪═════╪═════╪═════╪═════╡ │ 2025-12-30 ┆ 29 ┆ 44 ┆ 26 ┆ 11 ┆ 34 ┆ 10 ┆ 1 │ │ 2026-01-02 ┆ 46 ┆ 42 ┆ 27 ┆ 44 ┆ 8 ┆ 10 ┆ 1 │ │ 2026-01-06 ┆ 5 ┆ 17 ┆ 18 ┆ 14 ┆ 31 ┆ 12 ┆ 10 │ │ 2026-01-09 ┆ 10 ┆ 34 ┆ 26 ┆ 7 ┆ 1 ┆ 2 ┆ 4 │ │ 2026-01-13 ┆ 47 ┆ 6 ┆ 44 ┆ 10 ┆ 18 ┆ 10 ┆ 2 │ │ 2026-01-16 ┆ 5 ┆ 24 ┆ 17 ┆ 50 ┆ 29 ┆ 10 ┆ 5 │ │ 2026-01-20 ┆ 22 ┆ 18 ┆ 19 ┆ 50 ┆ 11 ┆ 1 ┆ 11 │ │ 2026-01-23 ┆ 4 ┆ 42 ┆ 5 ┆ 13 ┆ 21 ┆ 3 ┆ 10 │ │ 2026-01-27 ┆ 47 ┆ 42 ┆ 23 ┆ 43 ┆ 4 ┆ 9 ┆ 3 │ │ 2026-01-30 ┆ 14 ┆ 18 ┆ 31 ┆ 35 ┆ 46 ┆ 7 ┆ 11 │ └────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
Within your project
from frenchlottery import get_last_euromillions_results, get_last_loto_results
loto_res = get_last_loto_results()
euro_res = get_last_euromillions_results()
...
TODO
- If
--linesparameter is specified, no need to pull entire history. The user will most likely pull 10-15 lines. - Add French lottery data from 1976
NB
- This is in no way affiliated to FDJ. I'm just using it as a source of historical data.
- The initial name for the package was
lotterywhich was way more elegant and worked perfectly within test PyPI (https://test.pypi.org/project/lottery/). However when publishing to PyPI, the name isn't allowed.. Great..!
Project details
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 frenchlottery-0.4.0.tar.gz.
File metadata
- Download URL: frenchlottery-0.4.0.tar.gz
- Upload date:
- Size: 57.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2aa455b69665667feb8288da0adde8d1ffeaed7feb01fd42a2f413b6ea33e323
|
|
| MD5 |
93b7a6320230a57e68275a1d56fcf9b3
|
|
| BLAKE2b-256 |
8fbecb2b7e9222d5cdf027e28e6d1cfbe4a3310a689a0fdb38a4bfd45e4a23be
|
Provenance
The following attestation bundles were made for frenchlottery-0.4.0.tar.gz:
Publisher:
python-publish.yml on nick-voisin/frenchlottery
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
frenchlottery-0.4.0.tar.gz -
Subject digest:
2aa455b69665667feb8288da0adde8d1ffeaed7feb01fd42a2f413b6ea33e323 - Sigstore transparency entry: 1563566821
- Sigstore integration time:
-
Permalink:
nick-voisin/frenchlottery@47786b1da212d9b5f1e1643ca90daee1744032b9 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/nick-voisin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@47786b1da212d9b5f1e1643ca90daee1744032b9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file frenchlottery-0.4.0-py3-none-any.whl.
File metadata
- Download URL: frenchlottery-0.4.0-py3-none-any.whl
- Upload date:
- Size: 36.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1834349ab18b6e97290576e96d419eff990b40c814b9459c96132d791f67b4f8
|
|
| MD5 |
2a5adff4e06bc1dfcc3d2e76d2fe58c4
|
|
| BLAKE2b-256 |
7327454c5e34338a0f0715255750e270909860d517598ac67dde7d2804f4cc7b
|
Provenance
The following attestation bundles were made for frenchlottery-0.4.0-py3-none-any.whl:
Publisher:
python-publish.yml on nick-voisin/frenchlottery
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
frenchlottery-0.4.0-py3-none-any.whl -
Subject digest:
1834349ab18b6e97290576e96d419eff990b40c814b9459c96132d791f67b4f8 - Sigstore transparency entry: 1563566844
- Sigstore integration time:
-
Permalink:
nick-voisin/frenchlottery@47786b1da212d9b5f1e1643ca90daee1744032b9 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/nick-voisin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@47786b1da212d9b5f1e1643ca90daee1744032b9 -
Trigger Event:
release
-
Statement type: