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..!
Metadata
Release files for frenchlottery 0.5.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 |
|---|---|---|---|---|
| frenchlottery-0.5.0.tar.gz | 34.9 kB | With provenance | Details for frenchlottery-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| frenchlottery-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for frenchlottery-0.5.0-py3-none-any.whl |
Total release size: 71.2 kB
Release files / frenchlottery-0.5.0.tar.gz
| Download URL | frenchlottery-0.5.0.tar.gz |
|---|---|
| Size | 34.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd311cec7aa9b1659c662ba99fb939f205830c905ff871e7cadfa7443fdaeaaa
|
|
BLAKE2b-256 checksum How to use checksums |
ecd48abd67337782a4400037cede79aee02cb762836b89856af4d7e38209f305
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 13, 2026.
Transparency logRelease files / frenchlottery-0.5.0-py3-none-any.whl
| Download URL | frenchlottery-0.5.0-py3-none-any.whl |
|---|---|
| Size | 36.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b75ba57845f8716950fe4f0f77dc2dff8561f656b23cb419d25c7d439d212021
|
|
BLAKE2b-256 checksum How to use checksums |
5337777ba5de257f1f6e8eb4eba364609a5f2462d6a2ada11ed3660dbb12b00a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 13, 2026.
Transparency logSecurity for frenchlottery 0.5.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
Both files in this release have been uploaded with provenance metadata.
Attestation for frenchlottery-0.5.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 Nov 13, 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.