Skip to content

Commit 1473969

Browse files
authored
Merge pull request #79 from appwrite/dev
Fix between query output
2 parents a7e47e4 + ce7745c commit 1473969

20 files changed

+337
-166
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite Python SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.4.2-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.4.12-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

appwrite/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ def __init__(self):
1111
self._endpoint = 'https://HOSTNAME/v1'
1212
self._global_headers = {
1313
'content-type': '',
14-
'user-agent' : 'AppwritePythonSDK/4.0.0 (${os.uname().sysname}; ${os.uname().version}; ${os.uname().machine})',
14+
'user-agent' : 'AppwritePythonSDK/4.1.0 (${os.uname().sysname}; ${os.uname().version}; ${os.uname().machine})',
1515
'x-sdk-name': 'Python',
1616
'x-sdk-platform': 'server',
1717
'x-sdk-language': 'python',
18-
'x-sdk-version': '4.0.0',
18+
'x-sdk-version': '4.1.0',
1919
'X-Appwrite-Response-Format' : '1.4.0',
2020
}
2121

appwrite/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def is_not_null(attribute):
3333

3434
@staticmethod
3535
def between(attribute, start, end):
36-
return Query.add_query(attribute, "between", [start, end])
36+
return f'between("{attribute}", {Query.parseValues(start)}, {Query.parseValues(end)})'
3737

3838
@staticmethod
3939
def starts_with(attribute, value):

appwrite/services/account.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def __init__(self, client):
77
super(Account, self).__init__(client)
88

99
def get(self):
10-
"""Get Account"""
10+
"""Get account"""
1111

1212

1313
api_path = '/account'
@@ -18,7 +18,7 @@ def get(self):
1818
}, api_params)
1919

2020
def update_email(self, email, password):
21-
"""Update Email"""
21+
"""Update email"""
2222

2323

2424
api_path = '/account/email'
@@ -67,7 +67,7 @@ def delete_identity(self, identity_id):
6767
}, api_params)
6868

6969
def list_logs(self, queries = None):
70-
"""List Logs"""
70+
"""List logs"""
7171

7272

7373
api_path = '/account/logs'
@@ -80,7 +80,7 @@ def list_logs(self, queries = None):
8080
}, api_params)
8181

8282
def update_name(self, name):
83-
"""Update Name"""
83+
"""Update name"""
8484

8585

8686
api_path = '/account/name'
@@ -96,7 +96,7 @@ def update_name(self, name):
9696
}, api_params)
9797

9898
def update_password(self, password, old_password = None):
99-
"""Update Password"""
99+
"""Update password"""
100100

101101

102102
api_path = '/account/password'
@@ -113,7 +113,7 @@ def update_password(self, password, old_password = None):
113113
}, api_params)
114114

115115
def update_phone(self, phone, password):
116-
"""Update Phone"""
116+
"""Update phone"""
117117

118118

119119
api_path = '/account/phone'
@@ -133,7 +133,7 @@ def update_phone(self, phone, password):
133133
}, api_params)
134134

135135
def get_prefs(self):
136-
"""Get Account Preferences"""
136+
"""Get account preferences"""
137137

138138

139139
api_path = '/account/prefs'
@@ -144,7 +144,7 @@ def get_prefs(self):
144144
}, api_params)
145145

146146
def update_prefs(self, prefs):
147-
"""Update Preferences"""
147+
"""Update preferences"""
148148

149149

150150
api_path = '/account/prefs'
@@ -160,7 +160,7 @@ def update_prefs(self, prefs):
160160
}, api_params)
161161

162162
def create_recovery(self, email, url):
163-
"""Create Password Recovery"""
163+
"""Create password recovery"""
164164

165165

166166
api_path = '/account/recovery'
@@ -180,7 +180,7 @@ def create_recovery(self, email, url):
180180
}, api_params)
181181

182182
def update_recovery(self, user_id, secret, password, password_again):
183-
"""Create Password Recovery (confirmation)"""
183+
"""Create password recovery (confirmation)"""
184184

185185

186186
api_path = '/account/recovery'
@@ -208,7 +208,7 @@ def update_recovery(self, user_id, secret, password, password_again):
208208
}, api_params)
209209

210210
def list_sessions(self):
211-
"""List Sessions"""
211+
"""List sessions"""
212212

213213

214214
api_path = '/account/sessions'
@@ -219,7 +219,7 @@ def list_sessions(self):
219219
}, api_params)
220220

221221
def delete_sessions(self):
222-
"""Delete Sessions"""
222+
"""Delete sessions"""
223223

224224

225225
api_path = '/account/sessions'
@@ -230,7 +230,7 @@ def delete_sessions(self):
230230
}, api_params)
231231

232232
def get_session(self, session_id):
233-
"""Get Session"""
233+
"""Get session"""
234234

235235

236236
api_path = '/account/sessions/{sessionId}'
@@ -246,7 +246,7 @@ def get_session(self, session_id):
246246
}, api_params)
247247

248248
def update_session(self, session_id):
249-
"""Update OAuth Session (Refresh Tokens)"""
249+
"""Update OAuth session (refresh tokens)"""
250250

251251

252252
api_path = '/account/sessions/{sessionId}'
@@ -262,7 +262,7 @@ def update_session(self, session_id):
262262
}, api_params)
263263

264264
def delete_session(self, session_id):
265-
"""Delete Session"""
265+
"""Delete session"""
266266

267267

268268
api_path = '/account/sessions/{sessionId}'
@@ -278,7 +278,7 @@ def delete_session(self, session_id):
278278
}, api_params)
279279

280280
def update_status(self):
281-
"""Update Status"""
281+
"""Update status"""
282282

283283

284284
api_path = '/account/status'
@@ -289,7 +289,7 @@ def update_status(self):
289289
}, api_params)
290290

291291
def create_verification(self, url):
292-
"""Create Email Verification"""
292+
"""Create email verification"""
293293

294294

295295
api_path = '/account/verification'
@@ -305,7 +305,7 @@ def create_verification(self, url):
305305
}, api_params)
306306

307307
def update_verification(self, user_id, secret):
308-
"""Create Email Verification (confirmation)"""
308+
"""Create email verification (confirmation)"""
309309

310310

311311
api_path = '/account/verification'
@@ -325,7 +325,7 @@ def update_verification(self, user_id, secret):
325325
}, api_params)
326326

327327
def create_phone_verification(self):
328-
"""Create Phone Verification"""
328+
"""Create phone verification"""
329329

330330

331331
api_path = '/account/verification/phone'
@@ -336,7 +336,7 @@ def create_phone_verification(self):
336336
}, api_params)
337337

338338
def update_phone_verification(self, user_id, secret):
339-
"""Create Phone Verification (confirmation)"""
339+
"""Create phone verification (confirmation)"""
340340

341341

342342
api_path = '/account/verification/phone'

appwrite/services/avatars.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def __init__(self, client):
77
super(Avatars, self).__init__(client)
88

99
def get_browser(self, code, width = None, height = None, quality = None):
10-
"""Get Browser Icon"""
10+
"""Get browser icon"""
1111

1212

1313
api_path = '/avatars/browsers/{code}'
@@ -26,7 +26,7 @@ def get_browser(self, code, width = None, height = None, quality = None):
2626
}, api_params)
2727

2828
def get_credit_card(self, code, width = None, height = None, quality = None):
29-
"""Get Credit Card Icon"""
29+
"""Get credit card icon"""
3030

3131

3232
api_path = '/avatars/credit-cards/{code}'
@@ -45,7 +45,7 @@ def get_credit_card(self, code, width = None, height = None, quality = None):
4545
}, api_params)
4646

4747
def get_favicon(self, url):
48-
"""Get Favicon"""
48+
"""Get favicon"""
4949

5050

5151
api_path = '/avatars/favicon'
@@ -61,7 +61,7 @@ def get_favicon(self, url):
6161
}, api_params)
6262

6363
def get_flag(self, code, width = None, height = None, quality = None):
64-
"""Get Country Flag"""
64+
"""Get country flag"""
6565

6666

6767
api_path = '/avatars/flags/{code}'
@@ -80,7 +80,7 @@ def get_flag(self, code, width = None, height = None, quality = None):
8080
}, api_params)
8181

8282
def get_image(self, url, width = None, height = None):
83-
"""Get Image from URL"""
83+
"""Get image from URL"""
8484

8585

8686
api_path = '/avatars/image'
@@ -98,7 +98,7 @@ def get_image(self, url, width = None, height = None):
9898
}, api_params)
9999

100100
def get_initials(self, name = None, width = None, height = None, background = None):
101-
"""Get User Initials"""
101+
"""Get user initials"""
102102

103103

104104
api_path = '/avatars/initials'
@@ -114,7 +114,7 @@ def get_initials(self, name = None, width = None, height = None, background = No
114114
}, api_params)
115115

116116
def get_qr(self, text, size = None, margin = None, download = None):
117-
"""Get QR Code"""
117+
"""Get QR code"""
118118

119119

120120
api_path = '/avatars/qr'

0 commit comments

Comments
 (0)