Stripe Repr
A monkey-patch library to provide more compact representation for Stripe objects.
If you ever tried to explore the Stripe API from the console, you did notice that the representation format of the objects is overly verbose. A single call of something like stripe.Customer.list() pollutes the output with hundreds of lines of the output.
To simplify the exploratory work for ourselves, we created a simple stripe_repr library that we install in our development environment. Then we use it as-is:
import stripe_repr
stripe_repr.patch()
The output becomes more manageable:
>>> stripe.Customer.list()
ListObject(data=[Customer(id='cus_HOQHEicZ9WvOJk'), ..., Customer(id='cus_HOG3cB0b8sin1q')])
The second annoyance is date-times, represented in seconds since epoch. Whenever possible, the repr tries to convert them to a proper datetime and format as a string. When it's not enough, you can call a method formatted_dict() that also has a shortcut d().
In [1]: stripe.Invoice.retrieve('in_xxxxx).d()
Out [1]:
{'id': 'in_xxxxx',
'object': 'invoice',
'account_country': 'US',
...
'created': '2020-06-02T16:58:18',
'currency': 'usd',
}
Metadata
Release files for stripe-repr 1.0.2
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 |
|---|---|---|---|---|
| stripe-repr-1.0.2.tar.gz | 3.0 kB | Without provenance | Details for stripe-repr-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stripe_repr-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for stripe_repr-1.0.2-py3-none-any.whl |
Total release size: 6.2 kB
Release files / stripe-repr-1.0.2.tar.gz
| Download URL | stripe-repr-1.0.2.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dadd3fc18058c1e857865c9a850ed663705c2b9ad01e142809f69f2b3854ee29
|
|
BLAKE2b-256 checksum How to use checksums |
d35b00b7b62445fd54e779b60a2269d51b3d78e232a1f421bfc19588e2541d73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.8.2 Darwin/18.7.0
|
Release files / stripe_repr-1.0.2-py3-none-any.whl
| Download URL | stripe_repr-1.0.2-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a22ac875cff371c785909eb03fe167d4c89541c068cc9091559f37977f806842
|
|
BLAKE2b-256 checksum How to use checksums |
26dc81b37f220fafdbb7ac018b68211576d4003ba820c1b4dd3ec2fe8aa3a6b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.8.2 Darwin/18.7.0
|
Security for stripe-repr 1.0.2
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.