PayPal Reporter
A python library to generate reports about activity in a PayPal account. Currently supports listing transactions from the previous month.
I was looking for a way to get scheduled monthly summaries from PayPal, but could not find an existing solution. So I created this project, which retrieves transaction information via PayPal’s NVP API.
NOTE: This module is not created by, endorsed by, or in any way affiliated with PayPal.
Installation
To install paypal_reporter:
pip install paypal_reporter
Usage
To get a printout of the transactions from the previous month, first create a json file containing your PayPal account’s credentials:
{
"USER": "...",
"PWD": "...",
"SIGNATURE": "..."
}
Then run:
python -m paypal_reporter.transactions <path-to-credentials-file>
Limitations
PayPal’s API returns a maximum of 100 transactions. Currently this library does not handle pagination, therefore only 100 transactions are retrieved.
Dependencies
API
The following methods are defined in paypal_reporter.transactions and can be used to create your own reports.
- get_transactions(credentials, start_datetime, end_datetime)
Gets the list of transactions from PayPal in the given date range. credentials should be a dictionary containing USER, PWD and SIGNATURE. Returns a list of dicts, sorted by ascending timestamp. In case of a problem the method raises paypal_reporter.transactions.PayPalError.
- print_transactions(txns, format=’simple’, columns=DEFAULT_COLUMNS)
Given a list of transaction dicts, this method formats them using the tabulate library and prints then to stdout. format could be any format supported by tabulate, such as plain / simple / html / tsv. columns is a list of column names to take from the transaction dicts. The default columns are TIMESTAMP, TRANSACTIONID, STATUS, TYPE, NAME, AMT, FEEAMT, NETAMT, and CURRENCYCODE.
Metadata
Release files for paypal_reporter 0.1.3
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 |
|---|---|---|---|---|
| paypal_reporter-0.1.3.tar.gz | 4.0 kB | Without provenance | Details for paypal_reporter-0.1.3.tar.gz |
Release files / paypal_reporter-0.1.3.tar.gz
| Download URL | paypal_reporter-0.1.3.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f33c2cd3dcc64d874d93807491067de20aa56b71ba7832a76efa738f26de44f2
|
|
BLAKE2b-256 checksum How to use checksums |
87002febcda68f3cb27a2c67a6345e97a14ef0145a997200168682515af131ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for paypal_reporter 0.1.3
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.