You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/stale.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ jobs:
22
22
This probably means that it is not reproducible or it has been fixed in a newer version.
23
23
If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.
24
24
25
-
If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the [CONTRIBUTING.md](https://github.com/Shopify/shopify_python_api/blob/master/CONTRIBUTING.md) file for guidelines
25
+
If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the [CONTRIBUTING.md](https://github.com/Shopify/shopify_python_api/blob/main/CONTRIBUTING.md) file for guidelines
Copy file name to clipboardExpand all lines: CHANGELOG
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,24 @@
1
1
== Unreleased
2
2
3
+
- Remove requirement to provide scopes to Permission URL, as it should be omitted if defined with the TOML file.
4
+
5
+
== Version 12.7.0
6
+
7
+
- Remove requirement to use a predefined API version. Now you can use any valid API version string. ([#737](https://github.com/Shopify/shopify_python_api/pull/737))
8
+
9
+
== Version 12.6.0
10
+
11
+
- Update API version with 2024-07 release ([#723](https://github.com/Shopify/shopify_python_api/pull/723))
12
+
13
+
== Version 12.5.0
14
+
15
+
- Remove `cgi` import to avoid triggering a `DeprecationWarning` on Python 3.11.
16
+
- Update API version with 2024-04 release.([710](https://github.com/Shopify/shopify_python_api/pull/710))
17
+
18
+
== Version 12.4.0
19
+
20
+
- Update API version with 2023-07, 2023-10, 2024-01 releases ([#694](https://github.com/Shopify/shopify_python_api/pull/694))
21
+
3
22
== Version 12.3.0
4
23
5
24
- Update API version with 2023-04 release ([#649](https://github.com/Shopify/shopify_python_api/pull/649))
1. In order to access a shop's data, apps need an access token from that specific shop. We need to authenticate with that shop using OAuth, which we can start in the following way:
52
63
53
64
```python
54
65
shop_url ="SHOP_NAME.myshopify.com"
55
-
api_version ='2020-10'
66
+
api_version ='2024-07'
56
67
state = binascii.b2a_hex(os.urandom(15)).decode("utf-8")
shop = shopify.Shop.current() # Get the current shop
80
-
product = shopify.Product.find(179761209) # Get a specific product
92
+
# Note: REST API examples will be deprecated in 2025
93
+
shop = shopify.Shop.current() # Get the current shop
94
+
product = shopify.Product.find(179761209) # Get a specific product
81
95
82
-
#execute a graphQL call
96
+
#GraphQL API example
83
97
shopify.GraphQL().execute("{ shop { name id } }")
84
98
```
85
99
@@ -139,13 +153,21 @@ _Note: Your application must be public to test the billing process. To test on a
139
153
```
140
154
141
155
### Advanced Usage
156
+
157
+
>**⚠️ Note**: As of October 1, 2024, the REST Admin APIis legacy:
158
+
>- Public apps must migrate to GraphQL by February 2025
159
+
>- Custom apps must migrate to GraphQL by April 2025
160
+
>
161
+
> For migration guidance, see [Shopify's migration guide](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model)
162
+
142
163
It is recommended to have at least a basic grasp on the principles of the [pyactiveresource](https://github.com/Shopify/pyactiveresource) library, which is a port of rails/ActiveResource to Python and upon which this package relies heavily.
143
164
144
165
Instances of `pyactiveresource` resources map to RESTful resources in the Shopify API.
145
166
146
167
`pyactiveresource` exposes life cycle methods for creating, finding, updating, and deleting resources which are equivalent to the `POST`, `GET`, `PUT`, and`DELETE`HTTP verbs.
147
168
148
169
```python
170
+
# Note: REST API examples will be deprecated in 2025
149
171
product = shopify.Product()
150
172
product.title = "Shopify Logo T-Shirt"
151
173
product.id # => 292082188312
@@ -160,11 +182,18 @@ product.destroy()
160
182
# Delete the resource from the remote server (i.e. Shopify)
161
183
```
162
184
185
+
Here is another example to retrieve a list of open orders using certain parameters:
Some resources such as`Fulfillment` are prefixed by a parent resource in the Shopify API (e.g. `orders/450789469/fulfillments/255858046`). In order to interact with these resources, you must specify the identifier of the parent resource in your request.
166
194
167
195
```python
196
+
# Note: This REST API example will be deprecated in the future
@@ -179,6 +208,9 @@ This package also includes the `shopify_api.py` script to make it easy to open a
179
208
180
209
This library also supports Shopify's new [GraphQL API](https://help.shopify.com/en/api/graphql-admin-api). The authentication process is identical. Once your session is activated, simply construct a new graphql client and use `execute` to execute the query.
181
210
211
+
>**Note**: Shopify recommends using GraphQL APIfor new development asRESTAPI will be deprecated.
212
+
> See [Migration Guide](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) for more details.
213
+
182
214
```python
183
215
result = shopify.GraphQL().execute('{ shop { name id } }')
184
216
```
@@ -242,7 +274,7 @@ python setup.py test
242
274
## Relative Cursor Pagination
243
275
Cursor based pagination support has been added in6.0.0.
[Pre-commit](https://pre-commit.com/) is set up as a GitHub action that runs on pull requests and pushes to the `master` branch. If you want to run pre-commit locally, install it and set up the git hook scripts
290
+
[Pre-commit](https://pre-commit.com/) isset up as a GitHub action that runs on pull requests and pushes to the `main` branch. If you want to run pre-commit locally, install it andset up the git hook scripts
0 commit comments