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.0.0.tar.gz
(3.3 kB
view details)
Built Distribution
File details
Details for the file milli_piyango-1.0.0.tar.gz
.
File metadata
- Download URL: milli_piyango-1.0.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d56a1b36575e3e35a5dd62ab075e9f6b9565dd24077b09d725fb3ab41b79ab42 |
|
MD5 | 69583c56470232b7fb2ac98ecfadc6ed |
|
BLAKE2b-256 | e6eb2d5640cd05300f90efa527709db4da151af4c1334c67aa36aafa0df13217 |
File details
Details for the file milli_piyango-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: milli_piyango-1.0.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.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56513a3f38e419e1ced5e29b0e2eb01329976a85ae845d498f3781e729dfc6c6 |
|
MD5 | 903212c3413d9f34f976c2071d06b5b6 |
|
BLAKE2b-256 | 14adc577684afefe9d65ad6c1eebf461a093bf9915062c59e161c4b155e743bb |