
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Python Leap Card API (Unofficial). Access your card balance and journey history for Ireland's public transport smart card.
A Python API for accessing your current card balance and stats for Ireland's public transport Leap Card. This is an unoffical API and the author/contributors are in no way connected to Leap Card, Transport for Ireland, or any other agency. The API provides methods to:
For an example of this in use, see my Leap Card BitBar plugin
pip install pyleapcard
It's very easy to use. Try the following to get your card status and current balance:
from pyleapcard import *
from pprint import pprint
session = LeapSession()
session.try_login("<username>","<password>")
overview = session.get_card_overview()
pprint(vars(overview))
returns:
{'auto_topup': u'Not Enabled',
'balance': 25.02,
'card_label': u"<Card Label>",
'card_num': u'<Card Number>',
'card_status': u'Unblocked',
'card_type': u'Adult',
'credit_status': u'Unblocked',
'expiry_date': u'09/12/2023 12:00:00 AM',
'issue_date': u'02/04/2012 12:00:00 AM'}
Or to get your recent trips/topups add the following:
events = session.get_events()
for item in events:
pprint(vars(item))
returns:
{'date': u'06/09/2017',
'event_type': u'Travel Credit Deduction',
'price': -3.52,
'provider': u'Bus Eireann',
'time': u'11:45 AM',
'was_topup': False}
{'date': u'06/09/2017',
'event_type': u'Travel Credit Top-Up',
'price': 50.0,
'provider': u'Leap Top-Up App',
'time': u'10:00 AM',
'was_topup': True}
{'date': u'02/09/2017',
'event_type': u'Travel Credit Deduction',
'price': -3.52,
'provider': u'Bus Eireann',
'time': u'12:16 PM',
'was_topup': False}
python ./tests/tests.py
Fork this repo, make some changes and create a new pull request!
FAQs
Python Leap Card API (Unofficial). Access your card balance and journey history for Ireland's public transport smart card.
We found that pyleapcard demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.