Skip to content

skhg/pyPremiumSIM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyPremiumSIM

PyPI Codecov PyPI - Downloads

A Python API for accessing your PremiumSIM.de account balance & usage stats. This is an unoffical API and the author/contributors are in no way connected to PremiumSIM or Drillisch. The API provides a method to:

  • Get your current month's data balances (consumed and remaining GB)

Installation

pip install pypremiumsim

Usage

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

from pypremiumsim import *
from pprint import pprint

session = PremiumSimSession()
session.try_login("<username>", "<password>")
data_used = session.current_month_data_usage()

pprint(vars(data_used))

returns:

{'consumed_data_gb': 0.73585937,
 'tariff_total_data_gb': 20.0,
 'used_percentage': 3.7}

Tests

python ./tests/tests.py

Contributing

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

About

📱 Unofficial Python API for accessing your PremiumSIM.de account balance & usage stats

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published