Skip to content

Commit 6a2c3ff

Browse files
committed
update travis deploy script
1 parent d9945d3 commit 6a2c3ff

File tree

169 files changed

+344
-166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+344
-166
lines changed

appwrite.egg-info/PKG-INFO

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
Metadata-Version: 2.1
2+
Name: appwrite
3+
Version: 2.0.2
4+
Summary: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API
5+
Home-page: https://appwrite.io/support
6+
Download-URL: https://github.com/appwrite/sdk-for-python/archive/2.0.2.tar.gz
7+
Author: Appwrite Team
8+
Author-email: team@appwrite.io
9+
Maintainer: Appwrite Team
10+
Maintainer-email: team@appwrite.io
11+
License: BSD-3-Clause
12+
Classifier: Development Status :: 5 - Production/Stable
13+
Classifier: Intended Audience :: Developers
14+
Classifier: Environment :: Web Environment
15+
Classifier: Topic :: Software Development
16+
Classifier: License :: OSI Approved :: BSD License
17+
Classifier: Programming Language :: Python :: 3
18+
Classifier: Programming Language :: Python :: 3.5
19+
Classifier: Programming Language :: Python :: 3.6
20+
Classifier: Programming Language :: Python :: 3.7
21+
Classifier: Programming Language :: Python :: 3.8
22+
Description-Content-Type: text/markdown
23+
License-File: LICENSE
24+
25+
# Appwrite Python SDK
26+
27+
![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?style=flat-square)
28+
![Version](https://img.shields.io/badge/api%20version-1.3.2-blue.svg?style=flat-square)
29+
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
30+
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
31+
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
32+
33+
**This SDK is compatible with Appwrite server version 1.3.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).**
34+
35+
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)
36+
37+
![Appwrite](https://appwrite.io/images/github.png)
38+
39+
## Installation
40+
41+
To install via [PyPI](https://pypi.org/):
42+
43+
```bash
44+
pip install appwrite
45+
```
46+
47+
48+
## Getting Started
49+
50+
### Init your SDK
51+
Initialize your SDK with your Appwrite server API endpoint and project ID which can be found on your project settings page and your new API secret Key from project's API keys section.
52+
53+
```python
54+
from appwrite.client import Client
55+
from appwrite.services.users import Users
56+
57+
client = Client()
58+
59+
(client
60+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
61+
.set_project('5df5acd0d48c2') # Your project ID
62+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
63+
.set_self_signed() # Use only on dev mode with a self-signed SSL cert
64+
)
65+
```
66+
67+
### Make Your First Request
68+
Once your SDK object is set, create any of the Appwrite service objects and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the [API References](https://appwrite.io/docs) section.
69+
70+
```python
71+
users = Users(client)
72+
73+
result = users.create('[USER_ID]', 'email@example.com', 'password')
74+
```
75+
76+
### Full Example
77+
```python
78+
from appwrite.client import Client
79+
from appwrite.services.users import Users
80+
from appwrite.id import ID
81+
82+
client = Client()
83+
84+
(client
85+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
86+
.set_project('5df5acd0d48c2') # Your project ID
87+
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
88+
.set_self_signed() # Use only on dev mode with a self-signed SSL cert
89+
)
90+
91+
users = Users(client)
92+
93+
result = users.create(ID.unique(), 'email@example.com', 'password')
94+
```
95+
96+
### Error Handling
97+
The Appwrite Python SDK raises `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example.
98+
99+
```python
100+
users = Users(client)
101+
try:
102+
result = users.create(ID.unique(), 'email@example.com', 'password')
103+
except AppwriteException as e:
104+
print(e.message)
105+
```
106+
107+
### Learn more
108+
You can use the following resources to learn more and get help
109+
- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server)
110+
- 📜 [Appwrite Docs](https://appwrite.io/docs)
111+
- 💬 [Discord Community](https://appwrite.io/discord)
112+
- 🚂 [Appwrite Python Playground](https://github.com/appwrite/playground-for-python)
113+
114+
115+
## Contribution
116+
117+
This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
118+
119+
## License
120+
121+
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.

appwrite.egg-info/SOURCES.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
LICENSE
2+
README.md
3+
setup.cfg
4+
setup.py
5+
appwrite/__init__.py
6+
appwrite/client.py
7+
appwrite/exception.py
8+
appwrite/id.py
9+
appwrite/input_file.py
10+
appwrite/permission.py
11+
appwrite/query.py
12+
appwrite/role.py
13+
appwrite/service.py
14+
appwrite.egg-info/PKG-INFO
15+
appwrite.egg-info/SOURCES.txt
16+
appwrite.egg-info/dependency_links.txt
17+
appwrite.egg-info/requires.txt
18+
appwrite.egg-info/top_level.txt
19+
appwrite/services/__init__.py
20+
appwrite/services/account.py
21+
appwrite/services/avatars.py
22+
appwrite/services/databases.py
23+
appwrite/services/functions.py
24+
appwrite/services/graphql.py
25+
appwrite/services/health.py
26+
appwrite/services/locale.py
27+
appwrite/services/storage.py
28+
appwrite/services/teams.py
29+
appwrite/services/users.py
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

appwrite.egg-info/requires.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
requests

appwrite.egg-info/top_level.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
appwrite
2+
appwrite/services

appwrite/client.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ def __init__(self):
1111
self._endpoint = 'https://HOSTNAME/v1'
1212
self._global_headers = {
1313
'content-type': '',
14-
'user-agent' : 'AppwritePythonSDK/2.0.1 (${os.uname().sysname}; ${os.uname().version}; ${os.uname().machine})',
1514
'x-sdk-name': 'Python',
1615
'x-sdk-platform': 'server',
1716
'x-sdk-language': 'python',
18-
'x-sdk-version': '2.0.1',
17+
'x-sdk-version': '2.0.2',
1918
'X-Appwrite-Response-Format' : '1.0.0',
2019
}
2120

@@ -60,8 +59,6 @@ def call(self, method, path='', headers=None, params=None):
6059
if params is None:
6160
params = {}
6261

63-
params = {k: v for k, v in params.items() if v is not None} # Remove None values from params dictionary
64-
6562
data = {}
6663
json = {}
6764
files = {}

appwrite/services/databases.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ def update_boolean_attribute(self, database_id, collection_id, key, required, de
271271
if required is None:
272272
raise AppwriteException('Missing required parameter: "required"')
273273

274+
if default is None:
275+
raise AppwriteException('Missing required parameter: "default"')
276+
274277
path = path.replace('{databaseId}', database_id)
275278
path = path.replace('{collectionId}', collection_id)
276279
path = path.replace('{key}', key)
@@ -330,6 +333,9 @@ def update_datetime_attribute(self, database_id, collection_id, key, required, d
330333
if required is None:
331334
raise AppwriteException('Missing required parameter: "required"')
332335

336+
if default is None:
337+
raise AppwriteException('Missing required parameter: "default"')
338+
333339
path = path.replace('{databaseId}', database_id)
334340
path = path.replace('{collectionId}', collection_id)
335341
path = path.replace('{key}', key)
@@ -389,6 +395,9 @@ def update_email_attribute(self, database_id, collection_id, key, required, defa
389395
if required is None:
390396
raise AppwriteException('Missing required parameter: "required"')
391397

398+
if default is None:
399+
raise AppwriteException('Missing required parameter: "default"')
400+
392401
path = path.replace('{databaseId}', database_id)
393402
path = path.replace('{collectionId}', collection_id)
394403
path = path.replace('{key}', key)
@@ -455,6 +464,9 @@ def update_enum_attribute(self, database_id, collection_id, key, elements, requi
455464
if required is None:
456465
raise AppwriteException('Missing required parameter: "required"')
457466

467+
if default is None:
468+
raise AppwriteException('Missing required parameter: "default"')
469+
458470
path = path.replace('{databaseId}', database_id)
459471
path = path.replace('{collectionId}', collection_id)
460472
path = path.replace('{key}', key)
@@ -523,6 +535,9 @@ def update_float_attribute(self, database_id, collection_id, key, required, min,
523535
if max is None:
524536
raise AppwriteException('Missing required parameter: "max"')
525537

538+
if default is None:
539+
raise AppwriteException('Missing required parameter: "default"')
540+
526541
path = path.replace('{databaseId}', database_id)
527542
path = path.replace('{collectionId}', collection_id)
528543
path = path.replace('{key}', key)
@@ -592,6 +607,9 @@ def update_integer_attribute(self, database_id, collection_id, key, required, mi
592607
if max is None:
593608
raise AppwriteException('Missing required parameter: "max"')
594609

610+
if default is None:
611+
raise AppwriteException('Missing required parameter: "default"')
612+
595613
path = path.replace('{databaseId}', database_id)
596614
path = path.replace('{collectionId}', collection_id)
597615
path = path.replace('{key}', key)
@@ -653,6 +671,9 @@ def update_ip_attribute(self, database_id, collection_id, key, required, default
653671
if required is None:
654672
raise AppwriteException('Missing required parameter: "required"')
655673

674+
if default is None:
675+
raise AppwriteException('Missing required parameter: "default"')
676+
656677
path = path.replace('{databaseId}', database_id)
657678
path = path.replace('{collectionId}', collection_id)
658679
path = path.replace('{key}', key)
@@ -748,6 +769,9 @@ def update_string_attribute(self, database_id, collection_id, key, required, def
748769
if required is None:
749770
raise AppwriteException('Missing required parameter: "required"')
750771

772+
if default is None:
773+
raise AppwriteException('Missing required parameter: "default"')
774+
751775
path = path.replace('{databaseId}', database_id)
752776
path = path.replace('{collectionId}', collection_id)
753777
path = path.replace('{key}', key)
@@ -807,6 +831,9 @@ def update_url_attribute(self, database_id, collection_id, key, required, defaul
807831
if required is None:
808832
raise AppwriteException('Missing required parameter: "required"')
809833

834+
if default is None:
835+
raise AppwriteException('Missing required parameter: "default"')
836+
810837
path = path.replace('{databaseId}', database_id)
811838
path = path.replace('{collectionId}', collection_id)
812839
path = path.replace('{key}', key)

dist/appwrite-2.0.2.tar.gz

15.3 KB
Binary file not shown.

docs/examples/account/create-phone-verification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ from appwrite.services.account import Account
44
client = Client()
55

66
(client
7-
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
88
.set_project('5df5acd0d48c2') # Your project ID
99
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
1010
)

docs/examples/account/create-recovery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ from appwrite.services.account import Account
44
client = Client()
55

66
(client
7-
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
7+
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
88
.set_project('5df5acd0d48c2') # Your project ID
99
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
1010
)

0 commit comments

Comments
 (0)