From 9f6080ae7be1c3dff875a7c6e00df842e2f09997 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 26 Jul 2020 10:14:51 +0300 Subject: [PATCH 1/2] Updated Python SDK --- app/sdks/server-python/README.md | 6 +- app/sdks/server-python/appwrite/client.py | 39 +- .../examples/database/create-collection.md | 2 +- .../docs/examples/database/create-document.md | 2 +- .../examples/database/update-collection.md | 2 +- .../docs/examples/database/update-document.md | 2 +- .../docs/examples/storage/create-file.md | 2 +- .../docs/examples/storage/update-file.md | 2 +- .../docs/examples/teams/create-membership.md | 2 +- app/sdks/server-python/setup.py | 1 - composer.lock | 568 +++++++++++++----- 11 files changed, 469 insertions(+), 159 deletions(-) diff --git a/app/sdks/server-python/README.md b/app/sdks/server-python/README.md index 1d5c72a9c4..04421ff241 100644 --- a/app/sdks/server-python/README.md +++ b/app/sdks/server-python/README.md @@ -1,9 +1,9 @@ # Appwrite Python SDK ![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?v=1) -![Version](https://img.shields.io/badge/api%20version-0.6.1-blue.svg?v=1) +![Version](https://img.shields.io/badge/api%20version-0.6.2-blue.svg?v=1) -**This SDK is compatible with Appwrite server version 0.6.1. For older versions, please check previous releases.** +**This SDK is compatible with Appwrite server version 0.6.2. For older versions, please check previous 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. @@ -27,4 +27,4 @@ This library is auto-generated by Appwrite custom [SDK Generator](https://github ## License -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/app/sdks/server-python/appwrite/client.py b/app/sdks/server-python/appwrite/client.py index a9d0bf8a1b..e9b6e18e70 100644 --- a/app/sdks/server-python/appwrite/client.py +++ b/app/sdks/server-python/appwrite/client.py @@ -1,6 +1,6 @@ +import io import requests - class Client: def __init__(self): self._self_signed = False @@ -47,24 +47,34 @@ class Client: data = {} json = {} + files = {} - self._global_headers.update(headers) + headers = {**self._global_headers, **headers} if method != 'get': data = params params = {} - if headers['content-type'] == 'application/json': + if headers['content-type'].startswith('application/json'): json = data data = {} + if headers['content-type'].startswith('multipart/form-data'): + del headers['content-type'] + + for key in data.copy(): + if isinstance(data[key], io.BufferedIOBase): + files[key] = data[key] + del data[key] + response = requests.request( # call method dynamically https://stackoverflow.com/a/4246075/2299554 method=method, url=self._endpoint + path, - params=params, - data=data, + params=self.flatten(params), + data=self.flatten(data), json=json, - headers=self._global_headers, + files=files, + headers=headers, verify=self._self_signed, ) @@ -77,3 +87,20 @@ class Client: return response._content + def flatten(self, data, prefix=''): + output = {} + i = 0 + + for key in data: + value = data[key] if isinstance(data, dict) else key + finalKey = prefix + '[' + key +']' if prefix else key + finalKey = prefix + '[' + str(i) +']' if isinstance(data, list) else finalKey + i += 1 + + if isinstance(value, list) or isinstance(value, dict): + output = {**output, **self.flatten(value, finalKey)} + else: + output[finalKey] = value + + return output + diff --git a/app/sdks/server-python/docs/examples/database/create-collection.md b/app/sdks/server-python/docs/examples/database/create-collection.md index 357757880c..8741c13744 100644 --- a/app/sdks/server-python/docs/examples/database/create-collection.md +++ b/app/sdks/server-python/docs/examples/database/create-collection.md @@ -11,4 +11,4 @@ client = Client() database = Database(client) -result = database.create_collection('[NAME]', {}, {}, {}) +result = database.create_collection('[NAME]', [], [], []) diff --git a/app/sdks/server-python/docs/examples/database/create-document.md b/app/sdks/server-python/docs/examples/database/create-document.md index f8bcdef562..fff7a96bc0 100644 --- a/app/sdks/server-python/docs/examples/database/create-document.md +++ b/app/sdks/server-python/docs/examples/database/create-document.md @@ -11,4 +11,4 @@ client = Client() database = Database(client) -result = database.create_document('[COLLECTION_ID]', {}, {}, {}) +result = database.create_document('[COLLECTION_ID]', {}, [], []) diff --git a/app/sdks/server-python/docs/examples/database/update-collection.md b/app/sdks/server-python/docs/examples/database/update-collection.md index ef1a65a67d..0bf8f29fb8 100644 --- a/app/sdks/server-python/docs/examples/database/update-collection.md +++ b/app/sdks/server-python/docs/examples/database/update-collection.md @@ -11,4 +11,4 @@ client = Client() database = Database(client) -result = database.update_collection('[COLLECTION_ID]', '[NAME]', {}, {}) +result = database.update_collection('[COLLECTION_ID]', '[NAME]', [], []) diff --git a/app/sdks/server-python/docs/examples/database/update-document.md b/app/sdks/server-python/docs/examples/database/update-document.md index a3c9fe0b0b..40e11c0665 100644 --- a/app/sdks/server-python/docs/examples/database/update-document.md +++ b/app/sdks/server-python/docs/examples/database/update-document.md @@ -11,4 +11,4 @@ client = Client() database = Database(client) -result = database.update_document('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, {}, {}) +result = database.update_document('[COLLECTION_ID]', '[DOCUMENT_ID]', {}, [], []) diff --git a/app/sdks/server-python/docs/examples/storage/create-file.md b/app/sdks/server-python/docs/examples/storage/create-file.md index 045ef3adc3..fd76dd068b 100644 --- a/app/sdks/server-python/docs/examples/storage/create-file.md +++ b/app/sdks/server-python/docs/examples/storage/create-file.md @@ -11,4 +11,4 @@ client = Client() storage = Storage(client) -result = storage.create_file(document.getElementById('uploader').files[0], {}, {}) +result = storage.create_file(open('/path/to/file.png', 'rb'), [], []) diff --git a/app/sdks/server-python/docs/examples/storage/update-file.md b/app/sdks/server-python/docs/examples/storage/update-file.md index d1085e7df8..5001cbae74 100644 --- a/app/sdks/server-python/docs/examples/storage/update-file.md +++ b/app/sdks/server-python/docs/examples/storage/update-file.md @@ -11,4 +11,4 @@ client = Client() storage = Storage(client) -result = storage.update_file('[FILE_ID]', {}, {}) +result = storage.update_file('[FILE_ID]', [], []) diff --git a/app/sdks/server-python/docs/examples/teams/create-membership.md b/app/sdks/server-python/docs/examples/teams/create-membership.md index 5b68051829..e72ddc6fe3 100644 --- a/app/sdks/server-python/docs/examples/teams/create-membership.md +++ b/app/sdks/server-python/docs/examples/teams/create-membership.md @@ -11,4 +11,4 @@ client = Client() teams = Teams(client) -result = teams.create_membership('[TEAM_ID]', 'email@example.com', {}, 'https://example.com') +result = teams.create_membership('[TEAM_ID]', 'email@example.com', [], 'https://example.com') diff --git a/app/sdks/server-python/setup.py b/app/sdks/server-python/setup.py index 4903197191..fcc29409e2 100644 --- a/app/sdks/server-python/setup.py +++ b/app/sdks/server-python/setup.py @@ -23,7 +23,6 @@ setuptools.setup( 'Topic :: Software Development', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', diff --git a/composer.lock b/composer.lock index 6b23ee63e8..d4d95b4b55 100644 --- a/composer.lock +++ b/composer.lock @@ -195,16 +195,16 @@ }, { "name": "colinmollenhour/credis", - "version": "1.11.1", + "version": "1.11.2", "source": { "type": "git", "url": "https://github.com/colinmollenhour/credis.git", - "reference": "bd1da4698ab1918477f9e71e5ff0062b9a345008" + "reference": "b8b2bd6b87d2d4df67065f3510efb80d5f9c4e53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/bd1da4698ab1918477f9e71e5ff0062b9a345008", - "reference": "bd1da4698ab1918477f9e71e5ff0062b9a345008", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/b8b2bd6b87d2d4df67065f3510efb80d5f9c4e53", + "reference": "b8b2bd6b87d2d4df67065f3510efb80d5f9c4e53", "shasum": "" }, "require": { @@ -231,7 +231,7 @@ ], "description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.", "homepage": "https://github.com/colinmollenhour/credis", - "time": "2019-11-26T18:09:45+00:00" + "time": "2020-06-15T19:25:47+00:00" }, { "name": "composer/ca-bundle", @@ -485,12 +485,12 @@ "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d" + "reference": "e8ed4dbf49b260ff129ff0e0400718c3269971bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a4a1b6930528a8f7ee03518e6442ec7a44155d9d", - "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/e8ed4dbf49b260ff129ff0e0400718c3269971bf", + "reference": "e8ed4dbf49b260ff129ff0e0400718c3269971bf", "shasum": "" }, "require": { @@ -498,7 +498,7 @@ "guzzlehttp/promises": "^1.0", "guzzlehttp/psr7": "^1.6.1", "php": ">=5.5", - "symfony/polyfill-intl-idn": "1.17.0" + "symfony/polyfill-intl-idn": "^1.17.0" }, "require-dev": { "ext-curl": "*", @@ -544,7 +544,7 @@ "rest", "web service" ], - "time": "2020-05-25T19:35:05+00:00" + "time": "2020-07-02T06:52:04+00:00" }, { "name": "guzzlehttp/promises", @@ -552,24 +552,24 @@ "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "89b1a76b7fda5853401297dc4b2a093cba1fda23" + "reference": "bbf3b200bc83c1e9298580a9f99b9be248543467" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/89b1a76b7fda5853401297dc4b2a093cba1fda23", - "reference": "89b1a76b7fda5853401297dc4b2a093cba1fda23", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbf3b200bc83c1e9298580a9f99b9be248543467", + "reference": "bbf3b200bc83c1e9298580a9f99b9be248543467", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "^5.7.27 || ^7.5" + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^7.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -595,7 +595,7 @@ "keywords": [ "promise" ], - "time": "2020-02-15T23:33:03+00:00" + "time": "2020-06-21T23:10:57+00:00" }, { "name": "guzzlehttp/psr7", @@ -840,7 +840,7 @@ "version": "dev-master", "source": { "type": "git", - "url": "git@github.com:mustangostang/spyc.git", + "url": "https://github.com/mustangostang/spyc.git", "reference": "daf9fa4ef675519386b4f556c9d5ab5f9c14055a" }, "dist": { @@ -885,6 +885,48 @@ ], "time": "2019-12-03T17:11:33+00:00" }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99.x-dev", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "0947f25b883d4172df340a0d95f1b7cdabc5368a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0947f25b883d4172df340a0d95f1b7cdabc5368a", + "reference": "0947f25b883d4172df340a0d95f1b7cdabc5368a", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-08-07T13:07:48+00:00" + }, { "name": "phpmailer/phpmailer", "version": "v6.1.6", @@ -1137,21 +1179,22 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.17.0", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a" + "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a", - "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/bc6549d068d0160e0f10f7a5a23c7d1406b95ebe", + "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe", "shasum": "" }, "require": { "php": ">=5.3.3", - "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php70": "^1.10", "symfony/polyfill-php72": "^1.10" }, "suggest": { @@ -1160,7 +1203,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1180,6 +1227,10 @@ "name": "Laurent Bassin", "email": "laurent@bassin.info" }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" @@ -1195,40 +1246,61 @@ "portable", "shim" ], - "time": "2020-05-12T16:47:27+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { - "name": "symfony/polyfill-mbstring", + "name": "symfony/polyfill-intl-normalizer", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fa79b11539418b02fc5e1897267673ba2c19419c" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c", - "reference": "fa79b11539418b02fc5e1897267673ba2c19419c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "suggest": { - "ext-mbstring": "For best performance" + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, "files": [ "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1245,16 +1317,108 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for intl's Normalizer class and related functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "intl", + "normalizer", "polyfill", "portable", "shim" ], - "time": "2020-05-12T16:47:27+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php72", @@ -1262,12 +1426,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "f048e612a3905f34931127360bdd2def19a5e582" + "reference": "639447d008615574653fb3bc60d1986d7172eaae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582", - "reference": "f048e612a3905f34931127360bdd2def19a5e582", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", + "reference": "639447d008615574653fb3bc60d1986d7172eaae", "shasum": "" }, "require": { @@ -1276,7 +1440,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1309,20 +1477,34 @@ "portable", "shim" ], - "time": "2020-05-12T16:47:27+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "utopia-php/abuse", - "version": "0.2.0", + "version": "0.2.1", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "8a014449fe92b5275ef5006ac7f7ecaaec23e64d" + "reference": "b485eddeda335c4f7d1a16fbf5544e37bdf195ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/8a014449fe92b5275ef5006ac7f7ecaaec23e64d", - "reference": "8a014449fe92b5275ef5006ac7f7ecaaec23e64d", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/b485eddeda335c4f7d1a16fbf5544e37bdf195ac", + "reference": "b485eddeda335c4f7d1a16fbf5544e37bdf195ac", "shasum": "" }, "require": { @@ -1356,20 +1538,20 @@ "upf", "utopia" ], - "time": "2019-12-28T19:43:47+00:00" + "time": "2020-06-20T11:35:08+00:00" }, { "name": "utopia-php/audit", - "version": "0.3.0", + "version": "0.3.1", "source": { "type": "git", "url": "https://github.com/utopia-php/audit.git", - "reference": "ed624c324835859b68521099de13c01c6928703f" + "reference": "7bcceba05ed640fe910e7b6b0c82d998fb9d6495" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/ed624c324835859b68521099de13c01c6928703f", - "reference": "ed624c324835859b68521099de13c01c6928703f", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/7bcceba05ed640fe910e7b6b0c82d998fb9d6495", + "reference": "7bcceba05ed640fe910e7b6b0c82d998fb9d6495", "shasum": "" }, "require": { @@ -1403,20 +1585,20 @@ "upf", "utopia" ], - "time": "2020-04-17T19:42:29+00:00" + "time": "2020-06-20T11:36:43+00:00" }, { "name": "utopia-php/cache", - "version": "0.2.0", + "version": "0.2.1", "source": { "type": "git", "url": "https://github.com/utopia-php/cache.git", - "reference": "7c0dbf1ae1c216a2ab8c3fdb7f2c0166a2e0988d" + "reference": "52a20ae1d5e3f5be11492c4bb0af9cf2a2c07e5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cache/zipball/7c0dbf1ae1c216a2ab8c3fdb7f2c0166a2e0988d", - "reference": "7c0dbf1ae1c216a2ab8c3fdb7f2c0166a2e0988d", + "url": "https://api.github.com/repos/utopia-php/cache/zipball/52a20ae1d5e3f5be11492c4bb0af9cf2a2c07e5d", + "reference": "52a20ae1d5e3f5be11492c4bb0af9cf2a2c07e5d", "shasum": "" }, "require": { @@ -1450,7 +1632,7 @@ "upf", "utopia" ], - "time": "2019-12-09T13:02:50+00:00" + "time": "2020-06-20T11:43:40+00:00" }, { "name": "utopia-php/cli", @@ -1502,16 +1684,16 @@ }, { "name": "utopia-php/config", - "version": "0.2.0", + "version": "0.2.1", "source": { "type": "git", "url": "https://github.com/utopia-php/config.git", - "reference": "f1f41d3863eb00bd2837b45c2e17e8b5da1cf46d" + "reference": "48c5009c33b8426260ee7425100e716d7ed7f693" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/config/zipball/f1f41d3863eb00bd2837b45c2e17e8b5da1cf46d", - "reference": "f1f41d3863eb00bd2837b45c2e17e8b5da1cf46d", + "url": "https://api.github.com/repos/utopia-php/config/zipball/48c5009c33b8426260ee7425100e716d7ed7f693", + "reference": "48c5009c33b8426260ee7425100e716d7ed7f693", "shasum": "" }, "require": { @@ -1544,20 +1726,20 @@ "upf", "utopia" ], - "time": "2020-03-28T10:24:18+00:00" + "time": "2020-06-20T11:38:58+00:00" }, { "name": "utopia-php/domains", - "version": "0.2.0", + "version": "0.2.1", "source": { "type": "git", "url": "https://github.com/utopia-php/domains.git", - "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73" + "reference": "98e85296867a59c9d712d6ed768a5c5b2b297b43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/domains/zipball/1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", - "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73", + "url": "https://api.github.com/repos/utopia-php/domains/zipball/98e85296867a59c9d712d6ed768a5c5b2b297b43", + "reference": "98e85296867a59c9d712d6ed768a5c5b2b297b43", "shasum": "" }, "require": { @@ -1594,7 +1776,7 @@ "upf", "utopia" ], - "time": "2020-02-23T07:40:02+00:00" + "time": "2020-06-20T11:47:04+00:00" }, { "name": "utopia-php/framework", @@ -1642,16 +1824,16 @@ }, { "name": "utopia-php/locale", - "version": "0.2.0", + "version": "0.2.1", "source": { "type": "git", "url": "https://github.com/utopia-php/locale.git", - "reference": "e3e5f16b190e0ddc654ef2fd86f6280d7acc41b1" + "reference": "f2ed7f0b50fe961d65600871e8f8d9dea3167500" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/locale/zipball/e3e5f16b190e0ddc654ef2fd86f6280d7acc41b1", - "reference": "e3e5f16b190e0ddc654ef2fd86f6280d7acc41b1", + "url": "https://api.github.com/repos/utopia-php/locale/zipball/f2ed7f0b50fe961d65600871e8f8d9dea3167500", + "reference": "f2ed7f0b50fe961d65600871e8f8d9dea3167500", "shasum": "" }, "require": { @@ -1684,20 +1866,20 @@ "upf", "utopia" ], - "time": "2019-12-09T13:03:33+00:00" + "time": "2020-06-20T11:41:46+00:00" }, { "name": "utopia-php/registry", - "version": "0.2.0", + "version": "0.2.3", "source": { "type": "git", "url": "https://github.com/utopia-php/registry.git", - "reference": "ca38e4b9b1079fb375463c6a7df3eecc2cb91d10" + "reference": "948aa82942a1bde8b97ec74fdc1a83fb24122788" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/registry/zipball/ca38e4b9b1079fb375463c6a7df3eecc2cb91d10", - "reference": "ca38e4b9b1079fb375463c6a7df3eecc2cb91d10", + "url": "https://api.github.com/repos/utopia-php/registry/zipball/948aa82942a1bde8b97ec74fdc1a83fb24122788", + "reference": "948aa82942a1bde8b97ec74fdc1a83fb24122788", "shasum": "" }, "require": { @@ -1731,7 +1913,7 @@ "upf", "utopia" ], - "time": "2019-12-09T13:04:53+00:00" + "time": "2020-07-04T22:14:07+00:00" } ], "packages-dev": [ @@ -1741,7 +1923,7 @@ "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", - "reference": "a1672098ecc6a08cc400314e373b0d1cd5885f79" + "reference": "404cf6bb4c75f8ae3b2419e04f6afd215ed706a5" }, "require": { "ext-curl": "*", @@ -1771,7 +1953,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", - "time": "2020-05-30T11:38:32+00:00" + "time": "2020-07-26T07:11:06+00:00" }, { "name": "doctrine/instantiator", @@ -1779,12 +1961,12 @@ "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "a390fde13fc9bc2ffb73340bb8f07201a8e85af8" + "reference": "3e7a22aed197e9333cc929e7f6b4300bdae91fcc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a390fde13fc9bc2ffb73340bb8f07201a8e85af8", - "reference": "a390fde13fc9bc2ffb73340bb8f07201a8e85af8", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/3e7a22aed197e9333cc929e7f6b4300bdae91fcc", + "reference": "3e7a22aed197e9333cc929e7f6b4300bdae91fcc", "shasum": "" }, "require": { @@ -1827,7 +2009,7 @@ "constructor", "instantiate" ], - "time": "2020-05-30T16:47:47+00:00" + "time": "2020-06-15T18:51:04+00:00" }, { "name": "matthiasmullie/minify", @@ -1944,16 +2126,16 @@ "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "a491d65139e2411c75704e871dd02bdddf5a4bdc" + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a491d65139e2411c75704e871dd02bdddf5a4bdc", - "reference": "a491d65139e2411c75704e871dd02bdddf5a4bdc", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "replace": { "myclabs/deep-copy": "self.version" @@ -1984,7 +2166,7 @@ "object", "object graph" ], - "time": "2020-03-12T21:49:07+00:00" + "time": "2020-06-29T13:22:24+00:00" }, { "name": "phar-io/manifest", @@ -2094,12 +2276,12 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "985f414b55eca4296ffc99db960a97b3cc8fbcea" + "reference": "cf8df60735d98fd18070b7cab0019ba0831e219c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/985f414b55eca4296ffc99db960a97b3cc8fbcea", - "reference": "985f414b55eca4296ffc99db960a97b3cc8fbcea", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/cf8df60735d98fd18070b7cab0019ba0831e219c", + "reference": "cf8df60735d98fd18070b7cab0019ba0831e219c", "shasum": "" }, "require": { @@ -2135,7 +2317,7 @@ "reflection", "static analysis" ], - "time": "2020-04-27T09:34:19+00:00" + "time": "2020-06-19T17:42:03+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -2143,24 +2325,23 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" + "reference": "1ac416df3f66c542f2d3688925105b539f064b64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/1ac416df3f66c542f2d3688925105b539f064b64", + "reference": "1ac416df3f66c542f2d3688925105b539f064b64", "shasum": "" }, "require": { - "ext-filter": "^7.1", - "php": "^7.2", - "phpdocumentor/reflection-common": "^2.0", - "phpdocumentor/type-resolver": "^1.0", - "webmozart/assert": "^1" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "^1", - "mockery/mockery": "^1" + "mockery/mockery": "~1.3.2" }, "type": "library", "extra": { @@ -2188,7 +2369,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-02-22T12:28:44+00:00" + "time": "2020-07-21T08:16:41+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -2196,12 +2377,12 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "95d8782070ccd738295bbe4483f8760f998ad64d" + "reference": "94f3ddc5d77e49daadadd33b798b933e52dde82c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/95d8782070ccd738295bbe4483f8760f998ad64d", - "reference": "95d8782070ccd738295bbe4483f8760f998ad64d", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/94f3ddc5d77e49daadadd33b798b933e52dde82c", + "reference": "94f3ddc5d77e49daadadd33b798b933e52dde82c", "shasum": "" }, "require": { @@ -2234,7 +2415,7 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-05-13T13:46:15+00:00" + "time": "2020-06-19T19:40:27+00:00" }, { "name": "phpspec/prophecy", @@ -2242,29 +2423,29 @@ "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" + "reference": "c99da517f9e7b6e6c4067611d804808c34d8cec3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/c99da517f9e7b6e6c4067611d804808c34d8cec3", + "reference": "c99da517f9e7b6e6c4067611d804808c34d8cec3", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + "doctrine/instantiator": "^1.2", + "php": "^7.2", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { @@ -2297,7 +2478,7 @@ "spy", "stub" ], - "time": "2020-03-05T15:02:03+00:00" + "time": "2020-07-21T10:09:02+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3207,12 +3388,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", - "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", "shasum": "" }, "require": { @@ -3224,7 +3405,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3257,27 +3442,118 @@ "polyfill", "portable" ], - "time": "2020-05-12T16:14:59+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { - "name": "theseer/tokenizer", - "version": "1.1.3", + "name": "symfony/polyfill-mbstring", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "75a63c33a8577608444246075ea0af0d052e452a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -3297,7 +3573,13 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2020-07-12T23:59:07+00:00" }, { "name": "twig/twig", @@ -3305,12 +3587,12 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "5c6d49589687b4fe694059cab72da1ff5b7a5ece" + "reference": "e063bab1a67f4ceea759cee20c10ed609d1f6abb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/5c6d49589687b4fe694059cab72da1ff5b7a5ece", - "reference": "5c6d49589687b4fe694059cab72da1ff5b7a5ece", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/e063bab1a67f4ceea759cee20c10ed609d1f6abb", + "reference": "e063bab1a67f4ceea759cee20c10ed609d1f6abb", "shasum": "" }, "require": { @@ -3362,27 +3644,28 @@ "keywords": [ "templating" ], - "time": "2020-05-21T09:55:12+00:00" + "time": "2020-07-06T13:35:12+00:00" }, { "name": "webmozart/assert", - "version": "1.8.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6" + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6", - "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6", + "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0", + "php": "^5.3.3 || ^7.0 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { + "phpstan/phpstan": "<0.12.20", "vimeo/psalm": "<3.9.1" }, "require-dev": { @@ -3410,7 +3693,7 @@ "check", "validate" ], - "time": "2020-04-18T12:12:48+00:00" + "time": "2020-07-08T17:02:28+00:00" } ], "aliases": [], @@ -3434,5 +3717,6 @@ "platform-dev": [], "platform-overrides": { "php": "7.4" - } + }, + "plugin-api-version": "1.1.0" } From bcfbdd65cbeacf320a94b40e4dced29ec88210fd Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 26 Jul 2020 10:17:03 +0300 Subject: [PATCH 2/2] Updated Python SDK version --- app/config/platforms.php | 2 +- app/sdks/server-python/appwrite/client.py | 2 +- app/sdks/server-python/setup.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index f05dcde39b..2b1e3eb691 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -170,7 +170,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '0.0.5', + 'version' => '0.0.6', 'url' => 'https://github.com/appwrite/sdk-for-python', 'enabled' => true, 'beta' => true, diff --git a/app/sdks/server-python/appwrite/client.py b/app/sdks/server-python/appwrite/client.py index e9b6e18e70..8989fccb9c 100644 --- a/app/sdks/server-python/appwrite/client.py +++ b/app/sdks/server-python/appwrite/client.py @@ -7,7 +7,7 @@ class Client: self._endpoint = 'https://appwrite.io/v1' self._global_headers = { 'content-type': '', - 'x-sdk-version': 'appwrite:python:0.0.5', + 'x-sdk-version': 'appwrite:python:0.0.6', } def set_self_signed(self, status=True): diff --git a/app/sdks/server-python/setup.py b/app/sdks/server-python/setup.py index fcc29409e2..8e2fd0c3cb 100644 --- a/app/sdks/server-python/setup.py +++ b/app/sdks/server-python/setup.py @@ -3,7 +3,7 @@ import setuptools setuptools.setup( name = 'appwrite', packages = ['appwrite', 'appwrite/services'], - version = '0.0.5', + version = '0.0.6', license='BSD-3-Clause', description = 'Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API', author = 'Appwrite Team', @@ -11,7 +11,7 @@ setuptools.setup( maintainer = 'Appwrite Team', maintainer_email = 'team@localhost.test', url = 'https://appwrite.io/support', - download_url='https://github.com/appwrite/sdk-for-python/archive/0.0.5.tar.gz', + download_url='https://github.com/appwrite/sdk-for-python/archive/0.0.6.tar.gz', # keywords = ['SOME', 'MEANINGFULL', 'KEYWORDS'], install_requires=[ 'requests',