From 17b0c9ec9636e923af529a2193d2a9f2ff87d4db Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 16 Mar 2021 19:26:27 +0545 Subject: [PATCH 1/3] Python sdk getting started --- docs/sdks/python/GETTING_STARTED.md | 51 +++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 docs/sdks/python/GETTING_STARTED.md diff --git a/docs/sdks/python/GETTING_STARTED.md b/docs/sdks/python/GETTING_STARTED.md new file mode 100644 index 0000000000..195bf79deb --- /dev/null +++ b/docs/sdks/python/GETTING_STARTED.md @@ -0,0 +1,51 @@ +## Getting Started + +### Init your SDK +Initialize your SDK code with your project ID which can be found in your project settings page and your new API secret Key from previous phase. + +```python +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) +``` + +### Make Your First Request +Once your SDK object is set, create any of the Appwrite service project 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 section. + +```python +users = Users(client) + +result = users.create('email@example.com', 'password') +``` + +### Full Example +```python +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() + +(client + .set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint + .set_project('5df5acd0d48c2') # Your project ID + .set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key +) + +users = Users(client) + +result = users.create('email@example.com', 'password') +``` + +### Learn more +You can use followng resources to learn more and get help +- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) +- 📜 [Appwrite Docs](https://appwrite.io/docs) +- 💬 [Discord Community](https://appwrite.io/discord) +- 🚂 [Appwrite Python Playground](https://github.com/appwrite/playground-for-python) From b7538e0a6d191eb6206585edd8d0e6a49027d989 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 17 Mar 2021 10:43:47 +0545 Subject: [PATCH 2/3] text corrections --- docs/sdks/python/GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdks/python/GETTING_STARTED.md b/docs/sdks/python/GETTING_STARTED.md index 195bf79deb..06e1221b63 100644 --- a/docs/sdks/python/GETTING_STARTED.md +++ b/docs/sdks/python/GETTING_STARTED.md @@ -1,7 +1,7 @@ ## Getting Started ### Init your SDK -Initialize your SDK code with your project ID which can be found in your project settings page and your new API secret Key from previous phase. +Initialize your SDK code with your project ID which can be found in your project settings page and your new API secret Key from project's API keys section. ```python from appwrite.client import Client From d5be4f4c88c6b9678d407e95ec4b07cae0329be9 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 17 Mar 2021 18:31:40 +0545 Subject: [PATCH 3/3] fix grammar --- docs/sdks/python/GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdks/python/GETTING_STARTED.md b/docs/sdks/python/GETTING_STARTED.md index 06e1221b63..6b16fa3a94 100644 --- a/docs/sdks/python/GETTING_STARTED.md +++ b/docs/sdks/python/GETTING_STARTED.md @@ -17,7 +17,7 @@ client = Client() ``` ### Make Your First Request -Once your SDK object is set, create any of the Appwrite service project 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 section. +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 section. ```python users = Users(client)