You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-3Lines changed: 57 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,61 @@ OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc
13
13
14
14
## Building
15
15
16
-
Download the FirstLanguage Python SDK from <ahref="FirstLanguage_PythonSDK.zip">here</a>
16
+
You can use the SDK either from source by cloning from GitHub using our [repo](https://github.com/FirstLanguage/firstlanguage_python.git)
17
+
18
+
Or you can use PIP to install our package directly by using the command.
19
+
20
+
```
21
+
pip install firstlanguage-python
22
+
```
23
+
24
+
## Follow below steps if you want to use SDK from our PIP published package
25
+
26
+
Once the package is installed you can directly use our package in your code. Below is a working example. Replace <Your_API_KEY> with your API Key from the dashboard.
27
+
28
+
```
29
+
from firstlanguage_python.firstlanguage_client import Client
30
+
from firstlanguage_python.configuration import Environment
31
+
import jsonpickle
32
+
33
+
34
+
client = Client(
35
+
apikey='<Your_API_KEY>',
36
+
environment=Environment.PRODUCTION,)
37
+
38
+
reqbody='{"input":{"text":"அவள் வேகமாக ஓடினாள்","lang":"ta"} }'
39
+
40
+
body = jsonpickle.decode(reqbody)
41
+
basic_api_controller = client.basic_api
42
+
43
+
result = basic_api_controller.get_stemmer(body)
44
+
45
+
for res in result:
46
+
print("Original Text passed: "+res.orginal_text)
47
+
print("Stemmed result: "+res.stem)
48
+
49
+
50
+
```
51
+
52
+
Save the above file as test.py and run it using the below command
53
+
54
+
```
55
+
python3 test.py
56
+
```
57
+
58
+
You will get an output like below
59
+
60
+
```
61
+
200
62
+
Original Text passed: அவள்
63
+
Stemmed result: அவள்
64
+
Original Text passed: வேகமாக
65
+
Stemmed result: வேகம்
66
+
Original Text passed: ஓடினாள்
67
+
Stemmed result: ஓடி
68
+
```
69
+
70
+
## Follow below steps if you want to use SDK from source
17
71
18
72
You must have Python `3 >=3.7, <= 3.9` installed on your system to install and run this SDK. This SDK package depends on other Python packages like nose, jsonpickle etc. These dependencies are defined in the `requirements.txt` file that comes with the SDK. To resolve these dependencies, you can use the PIP Dependency manager. Install it by following steps at [https://pip.pypa.io/en/stable/installing/](https://pip.pypa.io/en/stable/installing/).
19
73
@@ -121,8 +175,8 @@ This API uses `Custom Header Signature`.
121
175
122
176
## List of APIs
123
177
124
-
*[Basic AP Is](/doc/controllers/basic-api.md)
125
-
*[Advanced AP Is](/doc/controllers/advanced-api.md)
Copy file name to clipboardExpand all lines: index.md
+55-1Lines changed: 55 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,61 @@ OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc
13
13
14
14
## Building
15
15
16
-
Download the FirstLanguage Python SDK from <ahref="FirstLanguage_PythonSDK.zip">here</a>
16
+
You can use the SDK either from source by cloning from GitHub using our [repo](https://github.com/FirstLanguage/firstlanguage_python.git)
17
+
18
+
Or you can use PIP to install our package directly by using the command.
19
+
20
+
```
21
+
pip install firstlanguage-python
22
+
```
23
+
24
+
## Follow below steps if you want to use SDK from our PIP published package
25
+
26
+
Once the package is installed you can directly use our package in your code. Below is a working example. Replace <Your_API_KEY> with your API Key from the dashboard.
27
+
28
+
```
29
+
from firstlanguage_python.firstlanguage_client import Client
30
+
from firstlanguage_python.configuration import Environment
31
+
import jsonpickle
32
+
33
+
34
+
client = Client(
35
+
apikey='<Your_API_KEY>',
36
+
environment=Environment.PRODUCTION,)
37
+
38
+
reqbody='{"input":{"text":"அவள் வேகமாக ஓடினாள்","lang":"ta"} }'
39
+
40
+
body = jsonpickle.decode(reqbody)
41
+
basic_api_controller = client.basic_api
42
+
43
+
result = basic_api_controller.get_stemmer(body)
44
+
45
+
for res in result:
46
+
print("Original Text passed: "+res.orginal_text)
47
+
print("Stemmed result: "+res.stem)
48
+
49
+
50
+
```
51
+
52
+
Save the above file as test.py and run it using the below command
53
+
54
+
```
55
+
python3 test.py
56
+
```
57
+
58
+
You will get an output like below
59
+
60
+
```
61
+
200
62
+
Original Text passed: அவள்
63
+
Stemmed result: அவள்
64
+
Original Text passed: வேகமாக
65
+
Stemmed result: வேகம்
66
+
Original Text passed: ஓடினாள்
67
+
Stemmed result: ஓடி
68
+
```
69
+
70
+
## Follow below steps if you want to use SDK from source
17
71
18
72
You must have Python `3 >=3.7, <= 3.9` installed on your system to install and run this SDK. This SDK package depends on other Python packages like nose, jsonpickle etc. These dependencies are defined in the `requirements.txt` file that comes with the SDK. To resolve these dependencies, you can use the PIP Dependency manager. Install it by following steps at [https://pip.pypa.io/en/stable/installing/](https://pip.pypa.io/en/stable/installing/).
0 commit comments