Skip to content

Commit 1f9821e

Browse files
committed
updated respo with stripe-wrapper source code
1 parent aa94393 commit 1f9821e

File tree

8 files changed

+61
-28
lines changed

8 files changed

+61
-28
lines changed

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2018 The Python Packaging Authority
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.
3.99 KB
Binary file not shown.

getstripeproducts/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . stripeproducts import get_products
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import stripe
2+
import json
3+
4+
def get_products(apikey):
5+
stripe.api_key = apikey
6+
products = stripe.Product.list(expand = ['data.default_price'])
7+
productdict = []
8+
for product in products:
9+
dict= {}
10+
dict['id'] = product['id']
11+
dict['Name'] = product['name']
12+
dict['Description'] = product['description']
13+
dict['Images'] = product['images']
14+
dict['Price'] = product["default_price"]["unit_amount"]/100
15+
productdict.append(dict)
16+
17+
with open("stripeproductlist.json", "w") as outfile:
18+
json.dump({"data": productdict}, outfile)
19+

py_stripe/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

pyproject.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "getstripeproducts"
7+
version = "0.0.1"
8+
authors = [
9+
{ name="Hassan", email="hassan.numl2013@gmail.com" },
10+
]
11+
description = "A Package for downloading products from stripe account using stripe API secret Key"
12+
readme = "README.md"
13+
requires-python = ">=3.7"
14+
classifiers = [
15+
"Programming Language :: Python :: 3",
16+
"License :: OSI Approved :: MIT License",
17+
"Operating System :: OS Independent",
18+
]
19+
dependencies = ["stripe"]
20+
[project.urls]
21+
"Homepage" = "https://github.com/pypa/getstripeproducts"
22+
"Bug Tracker" = "https://github.com/pypa/getstripeproducts/issues"

run.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)