Skip to main content

frenchlottery

CI - Test PyPI Latest Release License

Simple Python package to retrieve lottery data from FDJ website into a Polars DataFrame.

Installation

pip install frenchlottery
# or
uv add frenchlottery

To install the frenchlottery command globally with uv:

uv tool install frenchlottery

Usage

From the command line

  • French lottery (default) with last 5 draws:
    frenchlottery --source loto --lines 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:
    frenchlottery --source euro --lines 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_results
from frenchlottery.domain import LotterySource

loto_res = get_last_results(LotterySource.LOTO)
euro_res = get_last_results(LotterySource.EUROMILLIONS)
...

TODO

  • If --lines parameter 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 lottery which 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.1

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

Source distribution (sdist)

Source distribution for frenchlottery 0.5.1
File Size Uploaded Provenance Actions
frenchlottery-0.5.1.tar.gz 35.0 kB With provenance Details for frenchlottery-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for frenchlottery 0.5.1
File Interpreter ABI Platform Actions
frenchlottery-0.5.1-py3-none-any.whl Python 3 none any Details for frenchlottery-0.5.1-py3-none-any.whl

Total release size: 71.8 kB

Release files / frenchlottery-0.5.1.tar.gz

Download URL frenchlottery-0.5.1.tar.gz
Size 35.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b61ed017cec16ef755260f488eac43ddf2f20efc97a8dc39076e2928544fe9dd
BLAKE2b-256 checksum
How to use checksums
b6bc374e5d8a9d1b109b077f9e7cb4c9768399693d9782f0c4ebc1a6f4110a5b
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 log

Release files / frenchlottery-0.5.1-py3-none-any.whl

Download URL frenchlottery-0.5.1-py3-none-any.whl
Size 36.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db7dfcb5131122becedd70b543c74500b9bfb9eda74ea4161ac470a0e175169b
BLAKE2b-256 checksum
How to use checksums
544e73650aee1cae5adad6aeb930c928852eb527660b872e77e192b878a189b2
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 log

Security for frenchlottery 0.5.1

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.

Select from 2 files

Attestation for frenchlottery-0.5.1.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 log

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