Skip to main content

PremiumSIM API (Unofficial). Access basic account details and status information.

Project description

pyPremiumSIM

PyPI Codecov

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypremiumsim-0.0.2.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file pypremiumsim-0.0.2.tar.gz.

File metadata

  • Download URL: pypremiumsim-0.0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.12

File hashes

Hashes for pypremiumsim-0.0.2.tar.gz
Algorithm Hash digest
SHA256 009d0b1696263e9bc6459ee1ebc1c46ae97b4b9097b681973dcbee291cc4ecd8
MD5 a6bbf5ee8bf48ccd4d90feb8f9c16471
BLAKE2b-256 ece56eb4e766ff0e90c533f345ba71d64dc8988dbcd03796139a9be965e0fcdf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page