A library for managing lottery results.
Project description
Pactole
A Python library for managing lottery results.
Installation
Add pactole to your project:
pip install -U pactole
Or with uv:
uv add -U pactole
Documentation
See the complete documentation index: Documentation.
Requirements
Requires Python 3 (version 3.10 or newer).
Usage
import pactole
EuroMillions lottery
from datetime import date
from pactole import EuroMillions
lottery = EuroMillions()
# Build a known ticket
ticket = lottery.get_combination(numbers=[3, 15, 22, 28, 44], stars=[2, 9])
print(lottery.draw_days.days)
print(lottery.get_last_draw_date(from_date=date(2026, 2, 19)))
print(lottery.get_next_draw_date(from_date=date(2026, 2, 19)))
print(lottery.get_next_draw_date()) # From today
print(ticket.numbers.values)
print(ticket.stars.values)
print(ticket.rank)
# Generate 3 random combinations
combinations = lottery.generate(3)
print(combinations)
EuroDreams lottery
from datetime import date
from pactole import EuroDreams
lottery = EuroDreams()
# Build a known ticket
ticket = lottery.get_combination(numbers=[2, 3, 5, 7, 9, 38], dream=[3])
print(lottery.draw_days.days)
print(lottery.get_last_draw_date(from_date=date(2026, 2, 19)))
print(lottery.get_next_draw_date(from_date=date(2026, 2, 19)))
print(lottery.get_next_draw_date()) # From today
print(ticket.numbers.values)
print(ticket.dream.values)
print(ticket.rank)
# Generate 3 random combinations
combinations = lottery.generate(3)
print(combinations)
License
Copyright (c) 2026 Jean-Sébastien CONAN
Distributed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pactole-0.2.0.tar.gz
(77.3 kB
view details)
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
pactole-0.2.0-py3-none-any.whl
(21.7 kB
view details)
File details
Details for the file pactole-0.2.0.tar.gz.
File metadata
- Download URL: pactole-0.2.0.tar.gz
- Upload date:
- Size: 77.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30aa7eae337af0990fd269860e8a2f72cc1265c8e429fd2b940a3b6d41955526
|
|
| MD5 |
ce54b86466ece839c32ebb22620946dc
|
|
| BLAKE2b-256 |
94cc1084c2f217f35201f691748845648698ad42f50224e45afdab30374e6348
|
File details
Details for the file pactole-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pactole-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8fe257be67e9eb47e932fbd5d330460c5ba94d2b5c99c23f5ba97f47cab3c21
|
|
| MD5 |
42c16bac9b3e6f20d7ccbaaa8abc5df9
|
|
| BLAKE2b-256 |
d4f6f8ce66069fc7bbc053859027c4b13702097d3537bf23c2b79459b80b60ad
|