Skip to content

Commit

Permalink
generateReadme: Refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 7, 2024
1 parent e9eefd8 commit 7a4b493
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 81 deletions.
48 changes: 24 additions & 24 deletions .github/push_templates_to_algolia.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"id": "aa0e3e6f-1260-4452-8abf-7c084e26c8a4",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:40.761823Z",
"iopub.status.busy": "2024-02-01T07:24:40.761630Z",
"iopub.status.idle": "2024-02-01T07:24:40.807422Z",
"shell.execute_reply": "2024-02-01T07:24:40.806852Z"
"iopub.execute_input": "2024-02-07T08:00:25.629493Z",
"iopub.status.busy": "2024-02-07T08:00:25.629301Z",
"iopub.status.idle": "2024-02-07T08:00:25.675621Z",
"shell.execute_reply": "2024-02-07T08:00:25.675039Z"
},
"papermill": {},
"tags": []
Expand Down Expand Up @@ -95,10 +95,10 @@
"id": "cfa97168-63eb-4e8c-89c3-0a5d26f47740",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:40.810057Z",
"iopub.status.busy": "2024-02-01T07:24:40.809701Z",
"iopub.status.idle": "2024-02-01T07:24:40.812876Z",
"shell.execute_reply": "2024-02-01T07:24:40.812271Z"
"iopub.execute_input": "2024-02-07T08:00:25.678241Z",
"iopub.status.busy": "2024-02-07T08:00:25.677862Z",
"iopub.status.idle": "2024-02-07T08:00:25.681163Z",
"shell.execute_reply": "2024-02-07T08:00:25.680639Z"
},
"papermill": {},
"tags": []
Expand Down Expand Up @@ -141,10 +141,10 @@
"id": "7a9c86c2-931d-4113-abbc-31b3f517b6c4",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:40.815441Z",
"iopub.status.busy": "2024-02-01T07:24:40.815077Z",
"iopub.status.idle": "2024-02-01T07:24:40.901887Z",
"shell.execute_reply": "2024-02-01T07:24:40.901149Z"
"iopub.execute_input": "2024-02-07T08:00:25.683699Z",
"iopub.status.busy": "2024-02-07T08:00:25.683336Z",
"iopub.status.idle": "2024-02-07T08:00:25.768569Z",
"shell.execute_reply": "2024-02-07T08:00:25.767908Z"
},
"tags": []
},
Expand Down Expand Up @@ -178,10 +178,10 @@
"id": "c50e96b2-4403-413c-a99a-9243be0c0a04",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:40.904642Z",
"iopub.status.busy": "2024-02-01T07:24:40.904239Z",
"iopub.status.idle": "2024-02-01T07:24:42.248224Z",
"shell.execute_reply": "2024-02-01T07:24:42.247493Z"
"iopub.execute_input": "2024-02-07T08:00:25.771116Z",
"iopub.status.busy": "2024-02-07T08:00:25.770914Z",
"iopub.status.idle": "2024-02-07T08:00:27.608974Z",
"shell.execute_reply": "2024-02-07T08:00:27.608354Z"
},
"tags": []
},
Expand Down Expand Up @@ -230,10 +230,10 @@
"id": "da661ba3-fd15-4abc-bd4f-d13ae77b82b0",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:42.251148Z",
"iopub.status.busy": "2024-02-01T07:24:42.250741Z",
"iopub.status.idle": "2024-02-01T07:24:44.775844Z",
"shell.execute_reply": "2024-02-01T07:24:44.775145Z"
"iopub.execute_input": "2024-02-07T08:00:27.611965Z",
"iopub.status.busy": "2024-02-07T08:00:27.611452Z",
"iopub.status.idle": "2024-02-07T08:00:31.066261Z",
"shell.execute_reply": "2024-02-07T08:00:31.065614Z"
},
"tags": []
},
Expand All @@ -260,10 +260,10 @@
"id": "f1482a8f-4ce5-4e04-93c8-ddd883375d67",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:44.778523Z",
"iopub.status.busy": "2024-02-01T07:24:44.778075Z",
"iopub.status.idle": "2024-02-01T07:24:44.882908Z",
"shell.execute_reply": "2024-02-01T07:24:44.882265Z"
"iopub.execute_input": "2024-02-07T08:00:31.068779Z",
"iopub.status.busy": "2024-02-07T08:00:31.068581Z",
"iopub.status.idle": "2024-02-07T08:00:31.174703Z",
"shell.execute_reply": "2024-02-07T08:00:31.174022Z"
},
"tags": []
},
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4334,6 +4334,7 @@ We are committed to sharing templates and giving shout outs to the contributors

## Stripe
* [Create a customer](https://github.com/jupyter-naas/awesome-notebooks/blob/master/Stripe/Stripe_Create_a_customer.ipynb)
* [Create a payment link](https://github.com/jupyter-naas/awesome-notebooks/blob/master/Stripe/Stripe_Create_a_payment_link.ipynb)
* [Delete a customer](https://github.com/jupyter-naas/awesome-notebooks/blob/master/Stripe/Stripe_Delete_a_customer.ipynb)
* [Get balances](https://github.com/jupyter-naas/awesome-notebooks/blob/master/Stripe/Stripe_Get_balances.ipynb)
* [Get charges](https://github.com/jupyter-naas/awesome-notebooks/blob/master/Stripe/Stripe_Get_charges.ipynb)
Expand Down
66 changes: 54 additions & 12 deletions Stripe/Stripe_Create_a_payment_link.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"tags": []
},
"source": [
"<img width=\"8%\" alt=\"Naas.png\" src=\"https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/master/.github/assets/logos/Naas.png\" style=\"border-radius: 15%\">"
"<img width=\"8%\" alt=\"Stripe.png\" src=\"https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/master/.github/assets/logos/Stripe.png\" style=\"border-radius: 15%\">"
]
},
{
Expand All @@ -19,7 +19,8 @@
"tags": []
},
"source": [
"# Stripe - Create a payment link"
"# Stripe - Create a payment link\n",
"<a href=\"https://app.naas.ai/user-redirect/naas/downloader?url=https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/master/Stripe/Stripe_Create_a_payment_link.ipynb\" target=\"_parent\"><img src=\"https://naasai-public.s3.eu-west-3.amazonaws.com/Open_in_Naas_Lab.svg\"/></a><br><br><a href=\"https://bit.ly/3JyWIk6\">Give Feedback</a> | <a href=\"https://github.com/jupyter-naas/awesome-notebooks/issues/new?assignees=&labels=bug&template=bug_report.md&title=Stripe+-+Create+a+payment+link:+Error+short+description\">Bug report</a>"
]
},
{
Expand Down Expand Up @@ -74,7 +75,9 @@
"tags": []
},
"source": [
"**References:**\n- [Stripe API Documentation](https://stripe.com/docs/api)\n- [Stripe Python Library](https://stripe.com/docs/libraries#python)"
"**References:**\n",
"- [Stripe API Documentation](https://stripe.com/docs/api)\n",
"- [Stripe Python Library](https://stripe.com/docs/libraries#python)"
]
},
{
Expand Down Expand Up @@ -107,8 +110,10 @@
"papermill": {},
"tags": []
},
"source": "import stripe",
"outputs": []
"outputs": [],
"source": [
"import stripe"
]
},
{
"cell_type": "markdown",
Expand All @@ -118,7 +123,11 @@
"tags": []
},
"source": [
"### Setup variables\n- `stripe.api_key`: Your secret Stripe API key. You can find this in your Stripe Dashboard under Developers > API Keys. Make sure to use the secret key, not the publishable one.\n- `product`: The ID of the product that you want to create a payment link for. You can find this in your Stripe Dashboard under Products.\n- `unit_amount`: The amount to charge for the product, in the smallest currency unit (e.g., 100 cents to charge $1.00).\n- `currency`: The currency of the payment. This must be a valid ISO 4217 currency code."
"### Setup variables\n",
"- `stripe.api_key`: Your secret Stripe API key. You can find this in your Stripe Dashboard under Developers > API Keys. Make sure to use the secret key, not the publishable one.\n",
"- `product`: The ID of the product that you want to create a payment link for. You can find this in your Stripe Dashboard under Products.\n",
"- `unit_amount`: The amount to charge for the product, in the smallest currency unit (e.g., 100 cents to charge $1.00).\n",
"- `currency`: The currency of the payment. This must be a valid ISO 4217 currency code."
]
},
{
Expand All @@ -129,8 +138,13 @@
"papermill": {},
"tags": []
},
"source": "stripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\nproduct = \"prod_J6a8Jqj1I3kVVf\"\nunit_amount = 100\ncurrency = \"usd\"",
"outputs": []
"outputs": [],
"source": [
"stripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n",
"product = \"prod_J6a8Jqj1I3kVVf\"\n",
"unit_amount = 100\n",
"currency = \"usd\""
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -173,8 +187,24 @@
"papermill": {},
"tags": []
},
"source": "payment_link = stripe.PaymentLink.create(\n line_items=[\n {\n \"price_data\": {\n \"product\": product,\n \"unit_amount\": unit_amount,\n \"currency\": currency,\n },\n \"quantity\": 1,\n }\n ],\n mode=\"payment\",\n success_url=\"https://example.com/success\",\n cancel_url=\"https://example.com/cancel\",\n)",
"outputs": []
"outputs": [],
"source": [
"payment_link = stripe.PaymentLink.create(\n",
" line_items=[\n",
" {\n",
" \"price_data\": {\n",
" \"product\": product,\n",
" \"unit_amount\": unit_amount,\n",
" \"currency\": currency,\n",
" },\n",
" \"quantity\": 1,\n",
" }\n",
" ],\n",
" mode=\"payment\",\n",
" success_url=\"https://example.com/success\",\n",
" cancel_url=\"https://example.com/cancel\",\n",
")"
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -206,8 +236,10 @@
"papermill": {},
"tags": []
},
"source": "print(payment_link.url)",
"outputs": []
"outputs": [],
"source": [
"print(payment_link.url)"
]
}
],
"metadata": {
Expand All @@ -228,6 +260,16 @@
"pygments_lexer": "ipython3",
"version": "3.9.6"
},
"naas": {
"notebook_id": "76315111f4378c3abc1da1821c61b7944b33508646392b80d30be4aa06a9ebf4",
"notebook_path": "Stripe/Stripe_Create_a_payment_link.ipynb"
},
"papermill": {
"default_parameters": {},
"environment_variables": {},
"parameters": {},
"version": "2.5.0"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
Expand Down
88 changes: 44 additions & 44 deletions generate_readme.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"id": "sitting-directory",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:24.042942Z",
"iopub.status.busy": "2024-02-01T07:24:24.042475Z",
"iopub.status.idle": "2024-02-01T07:24:26.697321Z",
"shell.execute_reply": "2024-02-01T07:24:26.696698Z"
"iopub.execute_input": "2024-02-07T08:00:09.027244Z",
"iopub.status.busy": "2024-02-07T08:00:09.027044Z",
"iopub.status.idle": "2024-02-07T08:00:11.586062Z",
"shell.execute_reply": "2024-02-07T08:00:11.585390Z"
},
"tags": []
},
Expand Down Expand Up @@ -94,10 +94,10 @@
"id": "guided-edgar",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:26.700720Z",
"iopub.status.busy": "2024-02-01T07:24:26.700272Z",
"iopub.status.idle": "2024-02-01T07:24:26.704256Z",
"shell.execute_reply": "2024-02-01T07:24:26.703686Z"
"iopub.execute_input": "2024-02-07T08:00:11.589183Z",
"iopub.status.busy": "2024-02-07T08:00:11.588972Z",
"iopub.status.idle": "2024-02-07T08:00:11.592730Z",
"shell.execute_reply": "2024-02-07T08:00:11.592132Z"
},
"tags": []
},
Expand Down Expand Up @@ -140,10 +140,10 @@
"id": "36c9011e-5f51-4779-8062-a627503100e1",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:26.706746Z",
"iopub.status.busy": "2024-02-01T07:24:26.706403Z",
"iopub.status.idle": "2024-02-01T07:24:27.042204Z",
"shell.execute_reply": "2024-02-01T07:24:27.041479Z"
"iopub.execute_input": "2024-02-07T08:00:11.595259Z",
"iopub.status.busy": "2024-02-07T08:00:11.594823Z",
"iopub.status.idle": "2024-02-07T08:00:11.874246Z",
"shell.execute_reply": "2024-02-07T08:00:11.873549Z"
},
"tags": []
},
Expand Down Expand Up @@ -211,10 +211,10 @@
"id": "7fa60d66-a43a-4ba3-abfb-ee1779afdfc3",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:27.045240Z",
"iopub.status.busy": "2024-02-01T07:24:27.044804Z",
"iopub.status.idle": "2024-02-01T07:24:27.048469Z",
"shell.execute_reply": "2024-02-01T07:24:27.047828Z"
"iopub.execute_input": "2024-02-07T08:00:11.877286Z",
"iopub.status.busy": "2024-02-07T08:00:11.876888Z",
"iopub.status.idle": "2024-02-07T08:00:11.880579Z",
"shell.execute_reply": "2024-02-07T08:00:11.879959Z"
},
"tags": []
},
Expand Down Expand Up @@ -251,10 +251,10 @@
"id": "f9a4c7b2-d667-4555-98ed-31786278e947",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:27.051011Z",
"iopub.status.busy": "2024-02-01T07:24:27.050637Z",
"iopub.status.idle": "2024-02-01T07:24:27.064340Z",
"shell.execute_reply": "2024-02-01T07:24:27.063826Z"
"iopub.execute_input": "2024-02-07T08:00:11.883090Z",
"iopub.status.busy": "2024-02-07T08:00:11.882751Z",
"iopub.status.idle": "2024-02-07T08:00:11.896164Z",
"shell.execute_reply": "2024-02-07T08:00:11.895525Z"
},
"tags": []
},
Expand Down Expand Up @@ -387,10 +387,10 @@
"id": "9f21cfbb-2bcc-4bca-81a4-fad14b081371",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:27.066926Z",
"iopub.status.busy": "2024-02-01T07:24:27.066559Z",
"iopub.status.idle": "2024-02-01T07:24:27.072362Z",
"shell.execute_reply": "2024-02-01T07:24:27.071736Z"
"iopub.execute_input": "2024-02-07T08:00:11.898679Z",
"iopub.status.busy": "2024-02-07T08:00:11.898369Z",
"iopub.status.idle": "2024-02-07T08:00:11.904229Z",
"shell.execute_reply": "2024-02-07T08:00:11.903681Z"
},
"tags": []
},
Expand Down Expand Up @@ -480,10 +480,10 @@
"id": "cf449624-c614-43e5-9df6-2ccc93257efa",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:27.074716Z",
"iopub.status.busy": "2024-02-01T07:24:27.074537Z",
"iopub.status.idle": "2024-02-01T07:24:27.080921Z",
"shell.execute_reply": "2024-02-01T07:24:27.080422Z"
"iopub.execute_input": "2024-02-07T08:00:11.906699Z",
"iopub.status.busy": "2024-02-07T08:00:11.906321Z",
"iopub.status.idle": "2024-02-07T08:00:11.913106Z",
"shell.execute_reply": "2024-02-07T08:00:11.912586Z"
},
"tags": []
},
Expand Down Expand Up @@ -531,10 +531,10 @@
"id": "9f05fc34-0056-499e-aaac-beccbd490ce0",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:27.083268Z",
"iopub.status.busy": "2024-02-01T07:24:27.082920Z",
"iopub.status.idle": "2024-02-01T07:24:27.086498Z",
"shell.execute_reply": "2024-02-01T07:24:27.085880Z"
"iopub.execute_input": "2024-02-07T08:00:11.915716Z",
"iopub.status.busy": "2024-02-07T08:00:11.915319Z",
"iopub.status.idle": "2024-02-07T08:00:11.918733Z",
"shell.execute_reply": "2024-02-07T08:00:11.918161Z"
},
"tags": []
},
Expand Down Expand Up @@ -570,10 +570,10 @@
"id": "e45fc17e-ba5a-4317-92b3-f6de4c1a0bde",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:27.089062Z",
"iopub.status.busy": "2024-02-01T07:24:27.088714Z",
"iopub.status.idle": "2024-02-01T07:24:37.003641Z",
"shell.execute_reply": "2024-02-01T07:24:37.002958Z"
"iopub.execute_input": "2024-02-07T08:00:11.921241Z",
"iopub.status.busy": "2024-02-07T08:00:11.920870Z",
"iopub.status.idle": "2024-02-07T08:00:21.840716Z",
"shell.execute_reply": "2024-02-07T08:00:21.840044Z"
},
"tags": []
},
Expand Down Expand Up @@ -706,10 +706,10 @@
"id": "younger-consensus",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:37.006357Z",
"iopub.status.busy": "2024-02-01T07:24:37.005997Z",
"iopub.status.idle": "2024-02-01T07:24:37.012285Z",
"shell.execute_reply": "2024-02-01T07:24:37.011720Z"
"iopub.execute_input": "2024-02-07T08:00:21.843491Z",
"iopub.status.busy": "2024-02-07T08:00:21.843060Z",
"iopub.status.idle": "2024-02-07T08:00:21.849511Z",
"shell.execute_reply": "2024-02-07T08:00:21.848921Z"
},
"tags": []
},
Expand Down Expand Up @@ -743,10 +743,10 @@
"id": "2a95cba3-027c-4a57-8bfa-2ee1e9053bb7",
"metadata": {
"execution": {
"iopub.execute_input": "2024-02-01T07:24:37.014764Z",
"iopub.status.busy": "2024-02-01T07:24:37.014403Z",
"iopub.status.idle": "2024-02-01T07:24:37.192184Z",
"shell.execute_reply": "2024-02-01T07:24:37.191458Z"
"iopub.execute_input": "2024-02-07T08:00:21.852051Z",
"iopub.status.busy": "2024-02-07T08:00:21.851701Z",
"iopub.status.idle": "2024-02-07T08:00:22.025462Z",
"shell.execute_reply": "2024-02-07T08:00:22.024792Z"
},
"tags": []
},
Expand Down
2 changes: 1 addition & 1 deletion templates.json

Large diffs are not rendered by default.

0 comments on commit 7a4b493

Please sign in to comment.