A package for getting lottery data from mpi.gov.tr(Turkish Lottery)
Project description
Milli Piyango Package
This is a package for getting lottery related data from Milli Piyango.
Installation
pip install milli-piyango
Usage
For most case:
from milli_piyango import MilliPiyango as mP
# Getting available game list
print(mP.GAME_LIST)
# Get available drawing dates for given games
# Available game names
# - mP.PIYANGO
# - mP.SAYISAL
# - mP.SANS_TOPU
# - mP.ON_NUMARA
# - mP.SUPER_LOTO
dates = mP().get_draw_dates(mP.ON_NUMARA)
# [ {'tarih': '20180730', 'tarihView': '30-07-2018'}, ... ]
# Get game result for given date
last_drawing_result = mP().get_result(mP.ON_NUMARA, dates[0]['tarih']) # For the last drawing result
# Winner numbers in order
print(last_drawing_result['data']['rakamlarNumaraSirasi'])
# '08 - 11 - 15 - 16 - 17 - 18 - 20 - 25 - 28 - 30 - 34 - 39 - 40 - 43 - 48 - 53 - 59 - 64 - 66 - 67 - 71 - 79'
If you want to search a number (ticket number) is winner or not in Piyango
game;
from milli_piyango import MilliPiyango as mP
mP().get_result_for_piyango("20180729", "179604") # First parameter is Date, second one is Ticket Number
# {'kazandi': True, 'tip': '$6_RAKAM', 'ikramiye': 2500000, 'kacBildi': 6, 'numara': '179604', 'biletNo': '179604'}
mP().get_result_for_piyango("20180729", "178630")
# {'kazandi': True, 'tip': 'SON_BES_RAKAM', 'ikramiye': 400, 'kacBildi': 5, 'numara': '78630', 'biletNo': '178630'}
mP().get_result_for_piyango("20180729", "189604")
# {'kazandi': True, 'tip': 'AMORTI', 'ikramiye': 24, 'kacBildi': 1, 'numara': '4', 'biletNo': '189604'}
mP().get_result_for_piyango("20180729", "123452")
# {'kazandi': False, 'biletNo': '123452'}
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
milli_piyango-1.1.0.tar.gz
(3.4 kB
view details)
Built Distribution
File details
Details for the file milli_piyango-1.1.0.tar.gz
.
File metadata
- Download URL: milli_piyango-1.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.20.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 426b925795b588d94e084c4852b4ff51d3cf249f1fb61a58d7153cba75ce1042 |
|
MD5 | 7f1eb678d2958418dfbbac062e79068d |
|
BLAKE2b-256 | 1e07623cc7c522ec8e933bb8c22bd3c1a4307566c11309515b2c0065686eec30 |
File details
Details for the file milli_piyango-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: milli_piyango-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.20.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c93c7edb01e8f1e2408a971f90f95ba9fc290a21828dc7bcdd750c084b8aea5d |
|
MD5 | 961ff14b343589f229da2403219d1689 |
|
BLAKE2b-256 | c86b7b8e332f55e0c13dda0e871de62011b6623f034c4bfdb2ad2bce169734f4 |