New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pyleapo

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyleapo

A Python API for accessing your Leap Card balance, overview, and travel credit history.

  • 1.0.3
  • PyPI
  • Socket score

Maintainers
1

pyleapo

PyPI

An unoffical Python API for accessing your Leap Card balance, overview, and travel credit history. Underneath the hood, pyleapo uses Scrapy to retrieve its data and therefore brings you an additional suite of options to utilise further if necessary.

Requirements

  • Python 3.5.2+

Installation

Simply:

pip install pyleapo

Usage

There are three modules to choose from, the samples below showcase each of them one by one.

1. Card Overview

Retrieves a card's overview information such as the current balance and more.

Code
from pyleapo.overview import get_card_overview

overview = get_card_overview(username='', password='')

print(overview)
Output
{
  'auto_topup': '...',
  'card_expiry_date': '...',
  'card_issue_date': '...',
  'card_label': '...',
  'card_number': '...',
  'card_status': '...',
  'card_type': '...',
  'travel_credit_balance': '...',
  'travel_credit_status': '...'
}

2. Card History

Retrieves a card's travel credit history as far as it goes back.

Code
from pyleapo.history import get_card_history

history = get_card_history(username='', password='')

print(history)
Output
[
  {
    'amount': '...',
    'balance': '...',
    'date': '...',
    'source': '...',
    'time': '...',
    'transaction_type': '...'
  },
  ...
]

3. Card Overview and History

Retrieves both the overview and history of a card all in one.

Code
from pyleapo.aio import get_card_overview_and_history

both = get_card_overview_and_history(username='', password='')

print(both)
Output
{
  'overview': {
    'auto_topup': '...',
    'card_expiry_date': '...',
    'card_issue_date': '...',
    'card_label': '...',
    'card_number': '...',
    'card_status': '...',
    'card_type': '...',
    'travel_credit_balance': '...',
    'travel_credit_status': '...'
  },
  'events': [
    {
      'amount': '...',
      'balance': '...',
      'date': '...',
      'source': '...',
      'time': '...',
      'transaction_type': '...'
    },
    ...
  ]
}

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc