Skip to content

Commit 40c98f2

Browse files
committed
update version
1 parent 2aba7ee commit 40c98f2

File tree

8 files changed

+188
-602
lines changed

8 files changed

+188
-602
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ from faststripe.core import StripeApi
7575
import os
7676

7777
# Initialize with your API key from environment
78-
sapi = StripeApi(os.environ['STRIPE_SECRET_KEY'])
78+
sapi = StripeApi('your-api-key')
79+
```
80+
81+
``` python
82+
sapi.customers.post(
7983
```
8084

8185
``` python
@@ -176,7 +180,6 @@ responses, making it easy to work with large requests.
176180
``` python
177181
from faststripe.page import paged, pages
178182

179-
180183
for p in paged(sapi.customers.get, limit=5): break
181184
print(f"Got {len(p.data)} customers")
182185
print(f"Has more pages: {p.has_more}")

faststripe/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2025.06.30.1"
1+
__version__ = "2025.07.30"

faststripe/endpoints.py

Lines changed: 29 additions & 12 deletions
Large diffs are not rendered by default.

nbs/00_spec.ipynb

Lines changed: 70 additions & 280 deletions
Large diffs are not rendered by default.

nbs/01_core.ipynb

Lines changed: 60 additions & 252 deletions
Large diffs are not rendered by default.

nbs/02_page.ipynb

Lines changed: 6 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,13 @@
5353
"execution_count": null,
5454
"metadata": {},
5555
"outputs": [
56-
{
57-
"data": {
58-
"text/html": [
59-
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
60-
],
61-
"text/plain": []
62-
},
63-
"metadata": {},
64-
"output_type": "display_data"
65-
},
6656
{
6757
"data": {
6858
"text/markdown": [
6959
"[customers.get](https://docs.stripe.com/api/customers/list)(created: 'str', email: 'str', ending_before: 'str', expand: 'str', limit: 'str', starting_after: 'str', test_clock: 'str'): *List all customers*"
7060
],
7161
"text/plain": [
72-
"\u001b[1m[\u001b[0mcustomers.get\u001b[1m]\u001b[0m\u001b[1m(\u001b[0m\u001b[4;94mhttps://docs.stripe.com/api/customers/list\u001b[0m\u001b[4;94m)\u001b[0m\u001b[4;94m(\u001b[0m\u001b[4;94mcreated:\u001b[0m \u001b[32m'str'\u001b[0m, email: \u001b[32m'str'\u001b[0m, ending_before: \u001b[32m'str'\u001b[0m, expand: \u001b[32m'str'\u001b[0m, limit: \u001b[32m'str'\u001b[0m, starting_after: \u001b[32m'str'\u001b[0m, test_clock: \u001b[32m'str'\u001b[0m\u001b[1m)\u001b[0m: *List all customers*"
62+
"[customers.get](https://docs.stripe.com/api/customers/list)(created: 'str', email: 'str', ending_before: 'str', expand: 'str', limit: 'str', starting_after: 'str', test_clock: 'str'): *List all customers*"
7363
]
7464
},
7565
"execution_count": null,
@@ -86,24 +76,11 @@
8676
"execution_count": null,
8777
"metadata": {},
8878
"outputs": [
89-
{
90-
"data": {
91-
"text/html": [
92-
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
93-
],
94-
"text/plain": []
95-
},
96-
"metadata": {},
97-
"output_type": "display_data"
98-
},
9979
{
10080
"data": {
10181
"text/plain": [
102-
"\n",
103-
"\u001b[1m(\u001b[0m\n",
104-
" \u001b[1;35mdict_keys\u001b[0m\u001b[1m(\u001b[0m\u001b[1m[\u001b[0m\u001b[32m'object'\u001b[0m, \u001b[32m'data'\u001b[0m, \u001b[32m'has_more'\u001b[0m, \u001b[32m'url'\u001b[0m\u001b[1m]\u001b[0m\u001b[1m)\u001b[0m,\n",
105-
" \u001b[1;35mdict_keys\u001b[0m\u001b[1m(\u001b[0m\u001b[1m[\u001b[0m\u001b[32m'id'\u001b[0m, \u001b[32m'object'\u001b[0m, \u001b[32m'address'\u001b[0m, \u001b[32m'balance'\u001b[0m, \u001b[32m'created'\u001b[0m, \u001b[32m'currency'\u001b[0m, \u001b[32m'default_source'\u001b[0m, \u001b[32m'delinquent'\u001b[0m, \u001b[32m'description'\u001b[0m, \u001b[32m'discount'\u001b[0m, \u001b[32m'email'\u001b[0m, \u001b[32m'invoice_prefix'\u001b[0m, \u001b[32m'invoice_settings'\u001b[0m, \u001b[32m'livemode'\u001b[0m, \u001b[32m'metadata'\u001b[0m, \u001b[32m'name'\u001b[0m, \u001b[32m'next_invoice_sequence'\u001b[0m, \u001b[32m'phone'\u001b[0m, \u001b[32m'preferred_locales'\u001b[0m, \u001b[32m'shipping'\u001b[0m, \u001b[32m'tax_exempt'\u001b[0m, \u001b[32m'test_clock'\u001b[0m\u001b[1m]\u001b[0m\u001b[1m)\u001b[0m\n",
106-
"\u001b[1m)\u001b[0m"
82+
"(dict_keys(['object', 'data', 'has_more', 'url']),\n",
83+
" dict_keys(['id', 'object', 'address', 'balance', 'created', 'currency', 'default_source', 'delinquent', 'description', 'discount', 'email', 'invoice_prefix', 'invoice_settings', 'livemode', 'metadata', 'name', 'next_invoice_sequence', 'phone', 'preferred_locales', 'shipping', 'tax_exempt', 'test_clock']))"
10784
]
10885
},
10986
"execution_count": null,
@@ -144,15 +121,7 @@
144121
"cell_type": "code",
145122
"execution_count": null,
146123
"metadata": {},
147-
"outputs": [
148-
{
149-
"name": "stdout",
150-
"output_type": "stream",
151-
"text": [
152-
"Number of pages: 2\n"
153-
]
154-
}
155-
],
124+
"outputs": [],
156125
"source": [
157126
"ps = L(itertools.islice(paged(sapi.customers.get, limit=2), 2))\n",
158127
"cs = L(c for p in ps for c in p.data)\n",
@@ -191,24 +160,11 @@
191160
"execution_count": null,
192161
"metadata": {},
193162
"outputs": [
194-
{
195-
"data": {
196-
"text/html": [
197-
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
198-
],
199-
"text/plain": []
200-
},
201-
"metadata": {},
202-
"output_type": "display_data"
203-
},
204163
{
205164
"data": {
206165
"text/plain": [
207-
"\n",
208-
"\u001b[1m(\u001b[0m\n",
209-
" \u001b[1;36m588\u001b[0m,\n",
210-
" \u001b[1;35mdict_keys\u001b[0m\u001b[1m(\u001b[0m\u001b[1m[\u001b[0m\u001b[32m'id'\u001b[0m, \u001b[32m'object'\u001b[0m, \u001b[32m'address'\u001b[0m, \u001b[32m'balance'\u001b[0m, \u001b[32m'created'\u001b[0m, \u001b[32m'currency'\u001b[0m, \u001b[32m'default_source'\u001b[0m, \u001b[32m'delinquent'\u001b[0m, \u001b[32m'description'\u001b[0m, \u001b[32m'discount'\u001b[0m, \u001b[32m'email'\u001b[0m, \u001b[32m'invoice_prefix'\u001b[0m, \u001b[32m'invoice_settings'\u001b[0m, \u001b[32m'livemode'\u001b[0m, \u001b[32m'metadata'\u001b[0m, \u001b[32m'name'\u001b[0m, \u001b[32m'next_invoice_sequence'\u001b[0m, \u001b[32m'phone'\u001b[0m, \u001b[32m'preferred_locales'\u001b[0m, \u001b[32m'shipping'\u001b[0m, \u001b[32m'tax_exempt'\u001b[0m, \u001b[32m'test_clock'\u001b[0m\u001b[1m]\u001b[0m\u001b[1m)\u001b[0m\n",
211-
"\u001b[1m)\u001b[0m"
166+
"(853,\n",
167+
" dict_keys(['id', 'object', 'address', 'balance', 'created', 'currency', 'default_source', 'delinquent', 'description', 'discount', 'email', 'invoice_prefix', 'invoice_settings', 'livemode', 'metadata', 'name', 'next_invoice_sequence', 'phone', 'preferred_locales', 'shipping', 'tax_exempt', 'test_clock']))"
212168
]
213169
},
214170
"execution_count": null,

nbs/index.ipynb

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,17 @@
139139
"import os\n",
140140
"\n",
141141
"# Initialize with your API key from environment\n",
142-
"sapi = StripeApi(os.environ['STRIPE_SECRET_KEY'])"
142+
"sapi = StripeApi('your-api-key')"
143+
]
144+
},
145+
{
146+
"cell_type": "code",
147+
"execution_count": null,
148+
"id": "f7c13338",
149+
"metadata": {},
150+
"outputs": [],
151+
"source": [
152+
"sapi.customers.post("
143153
]
144154
},
145155
{
@@ -354,7 +364,6 @@
354364
"source": [
355365
"from faststripe.page import paged, pages\n",
356366
"\n",
357-
"\n",
358367
"for p in paged(sapi.customers.get, limit=5): break\n",
359368
"print(f\"Got {len(p.data)} customers\")\n",
360369
"print(f\"Has more pages: {p.has_more}\")"
@@ -475,8 +484,11 @@
475484
}
476485
],
477486
"metadata": {
478-
"solveit_dialog_mode": "learning",
479-
"solveit_ver": 2
487+
"kernelspec": {
488+
"display_name": "python3",
489+
"language": "python",
490+
"name": "python3"
491+
}
480492
},
481493
"nbformat": 4,
482494
"nbformat_minor": 5

settings.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[DEFAULT]
22
repo = faststripe
33
lib_name = faststripe
4-
version = 2025.06.30.1
4+
version = 2025.07.30.0
55
min_python = 3.9
66
license = apache2
77
black_formatting = False

0 commit comments

Comments
 (0)