SimplyGoPy: talk to transit (in Singapore)
SimplyGoPy enables you to talk to SimplyGo using Python.
Features
Currently basic features are supported:
- Login with SimplyGo login credentials.
- Retrieve notifications.
- Retrieve payment cards (you use to tap in/out at MRT/bus)
- Retrieve transactions
Authentication
These days encryption is no longer needed, the username and password are send in plaintext over HTTPS and signed with an HMAC signature.
Old:
SimplyGo used to use AES-CBC encryption when sending username and password to their API. The key/initialization vector were statically stored in p014sg.transitlink.base.Constants (from their Android application).
Installation
Simple using pip:
$ pipenv install SimplyGoPy
🚎 🚇
Examples
Get notifications:
import simplygo
from pprint import pprint
rider = simplygo.Ride('<username>', '<password>')
pprint(rider.get_notifications())
Get card information:
import simplygo
from pprint import pprint
rider = simplygo.Ride('<username>', '<password>')
pprint(rider.get_card_info())
Get user information:
import simplygo
from pprint import pprint
rider = simplygo.Ride('<username>', '<password>')
pprint(rider.get_user_info())
Get transactions of today:
import simplygo
from pprint import pprint
rider = simplygo.Ride('<username>', '<password>')
pprint(rider.get_transactions('< UniqueCode from get_card_info() >'))
Get transactions from date X till today:
import simplygo
from pprint import pprint
rider = simplygo.Ride('<username>', '<password>')
pprint(rider.get_transactions('< UniqueCode from get_card_info() >', '01-01-2019'))
Get transactions from date X till Y:
import simplygo
from pprint import pprint
rider = simplygo.Ride('<username>', '<password>')
pprint(rider.get_transactions('< UniqueCode from get_card_info() >', '01-06-2019', '01-07-2019'))
Get all transactions of this month:
import simplygo
from pprint import pprint
rider = simplygo.Ride('<username>', '<password>')
pprint(rider.get_transactions_this_month())
Get transactions of this month for specific card:
import simplygo
from pprint import pprint
rider = simplygo.Ride('<username>', '<password>')
pprint(rider.get_transactions_this_month('< UniqueCode from get_card_info() >'))
Disclaimer
I'm in no way affiliated with SimplyGo, Transit Link, or LTA.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Metadata
Release files for simplygopy 2021.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simplygopy-2021.5.1.tar.gz | 8.3 kB | Without provenance | Details for simplygopy-2021.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simplygopy-2021.5.1-py3-none-any.whl | Python 3 | none | any | Details for simplygopy-2021.5.1-py3-none-any.whl |
Total release size: 16.7 kB
Release files / simplygopy-2021.5.1.tar.gz
| Download URL | simplygopy-2021.5.1.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a346a1b80c0dbd80435a4e58df50804b7bdbbc7bcf0d526a38c62e7757d77500
|
|
BLAKE2b-256 checksum How to use checksums |
32c2815bbbcaa23745c0f78046f8e21c78f1589e032c55c09d47f9c92086e02b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
|
Release files / simplygopy-2021.5.1-py3-none-any.whl
| Download URL | simplygopy-2021.5.1-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f31a30b60725146b183f8a7cf83668e3010252689162e55dc909c77e18a471c9
|
|
BLAKE2b-256 checksum How to use checksums |
92b0e355d772d2d339efa7ae4aa4ff79364fe41416ecc83a16bd229af5ee2c7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
|
Security for simplygopy 2021.5.1
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.