Skip to content

Add 1.8.x support #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Appwrite Python SDK

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

**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).**
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).**

Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Python SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

Expand Down
6 changes: 3 additions & 3 deletions appwrite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ def __init__(self):
self._endpoint = 'https://cloud.appwrite.io/v1'
self._global_headers = {
'content-type': '',
'user-agent' : f'AppwritePythonSDK/11.1.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
'user-agent' : f'AppwritePythonSDK/12.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
'x-sdk-name': 'Python',
'x-sdk-platform': 'server',
'x-sdk-language': 'python',
'x-sdk-version': '11.1.0',
'X-Appwrite-Response-Format' : '1.7.0',
'x-sdk-version': '12.0.0',
'X-Appwrite-Response-Format' : '1.8.0',
}

def set_self_signed(self, status=True):
Expand Down
36 changes: 36 additions & 0 deletions appwrite/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,42 @@ def offset(offset):
def contains(attribute, value):
return str(Query("contains", attribute, value))

@staticmethod
def not_contains(attribute, value):
return str(Query("notContains", attribute, value))

@staticmethod
def not_search(attribute, value):
return str(Query("notSearch", attribute, value))

@staticmethod
def not_between(attribute, start, end):
return str(Query("notBetween", attribute, [start, end]))

@staticmethod
def not_starts_with(attribute, value):
return str(Query("notStartsWith", attribute, value))

@staticmethod
def not_ends_with(attribute, value):
return str(Query("notEndsWith", attribute, value))

@staticmethod
def created_before(value):
return str(Query("createdBefore", None, value))

@staticmethod
def created_after(value):
return str(Query("createdAfter", None, value))

@staticmethod
def updated_before(value):
return str(Query("updatedBefore", None, value))

@staticmethod
def updated_after(value):
return str(Query("updatedAfter", None, value))

@staticmethod
def or_queries(queries):
return str(Query("or", None, [json.loads(query) for query in queries]))
Expand Down
Loading