Skip to main content

pytescomobileirl

Build Status PyPI Codecov

A Python API for accessing your Tesco Mobile Ireland account balance & usage stats. This is an unoffical API and the author/contributors are in no way connected to Tesco or Tesco Mobile. The API provides methods to:

  • Get your current balances (€ credit and voice/text/data packages)
  • Get your usage records as far back as is available.

For an example of this in use, see my Tesco Mobile BitBar plugin

Installation

pip install pytescomobileirl

Usage

It's very easy to use. Try the following to get your balance data:

from pytescomobileirl import *
from pprint import pprint

session = pytescomobileirl.TescoSession()
session.login("<PhoneNumber>","<Password>")
balances = session.get_balances()

my_credit = balances.credit_remaining
my_data = balances.remaining_total("data")

print(my_credit)
print(my_data.summary())
pprint(vars(my_data))

returns:

14.28
939 MB
{'balance_expires': datetime.datetime(2017, 10, 15, 0, 0),
 'balance_type': u'data',
 'is_active': True,
 'remaining_qty': 939.181640625,
 'serviceCode': u'AB3',
 'unit': 'MByte'}

Or to get your usage history enter:

usage = session.get_usage()
pprint(vars(usage.records[0]))

returns:

{'called_number': u'tescomobile.liffeytelecom.com',
'charge': u'0.0',
'country_code': None,
'event_date': datetime.datetime(2017, 9, 23, 13, 33),
'roaming': False,
'service_code': u'GPBAS',
'service_name': u'GPRS Basic Service',
'unit': u'Bytes',
'use_type': u'DATA',
'volume': 119896.0}

Tests

python ./tests/tests.py

Contributing

Fork this repo, make some changes and create a new pull request!

Metadata

Release files for pytescomobileirl 0.2.4

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

Source distribution (sdist)

Source distribution for pytescomobileirl 0.2.4
File Size Uploaded Provenance Actions
pytescomobileirl-0.2.4.tar.gz 4.6 kB Without provenance Details for pytescomobileirl-0.2.4.tar.gz

Release files / pytescomobileirl-0.2.4.tar.gz

Download URL pytescomobileirl-0.2.4.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a631bd6b1beca27d5510aa82bf7ed10db246c33482fcba505de17eaa89b09f89
BLAKE2b-256 checksum
How to use checksums
fa96cfcaf8418502269cbff4b8c2e985b096958fb68ebe4eb9b21c7da12f9448
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10

Security for pytescomobileirl 0.2.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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