4
4
/vscode-markdown-toc-config -->
5
5
<!-- /vscode-markdown-toc -->
6
6
7
- # OpenHexa Toolbox DHIS2
7
+ # OpenHEXA Toolbox DHIS2
8
8
9
9
An utility library to acquire and process data from a DHIS2 instance.
10
10
@@ -35,38 +35,38 @@ pip install openhexa.toolbox
35
35
36
36
Credentials are required to initialize a connection to a DHIS2 instance, and must be provided through a ` Connection ` object.
37
37
38
- In an OpenHexa workspace (e.g. in an OpenHexa pipeline or in an OpenHexa notebook), a ` Connection ` object can be created using the OpenHexa SDK by providing the identifier of the workspace connection.
38
+ In an OpenHEXA workspace (e.g. in an OpenHEXA pipeline or in an OpenHEXA notebook), a ` Connection ` object can be created using the OpenHEXA SDK by providing the identifier of the workspace connection.
39
39
40
- ![ OpenHexa workspace connection] ( images/connection_id.png )
40
+ ![ OpenHEXA workspace connection] ( images/connection_id.png )
41
41
42
42
``` python
43
43
>> > from openhexa.sdk import workspace
44
44
>> > from openhexa.toolbox.dhis2 import DHIS2
45
45
46
- >> > # initialize a new connection in an OpenHexa workspace
46
+ >> > # initialize a new connection in an OpenHEXA workspace
47
47
>> > con = workspace.dhis2_connection(" DHIS2_PLAY" )
48
48
>> > dhis = DHIS2(con)
49
49
```
50
50
51
- Outside an OpenHexa workspace, a connection can be manually created using the SDK by providing the instance URL, an username and a password.
51
+ Outside an OpenHEXA workspace, a connection can be manually created using the SDK by providing the instance URL, an username and a password.
52
52
53
53
54
54
``` python
55
55
>> > from openhexa.sdk.workspaces.connections import DHIS2Connection
56
56
>> > from openhexa.toolbox.dhis2 import DHIS2
57
57
58
- >> > # initialize a new connection outside an OpenHexa workspace
58
+ >> > # initialize a new connection outside an OpenHEXA workspace
59
59
>> > con = DHIS2Connection(url = " https://play.dhis2.org/40.0.1" , username = " admin" , password = " district" )
60
60
>> > dhis = DHIS2(con)
61
61
```
62
62
63
- If needed, the OpenHexa SDK dependency can be bypassed by providing a ` namedtuple ` instead of a ` Connection ` object.
63
+ If needed, the OpenHEXA SDK dependency can be bypassed by providing a ` namedtuple ` instead of a ` Connection ` object.
64
64
65
65
``` python
66
66
>> > from collections import namedtuple
67
67
>> > from openhexa.toolbox.dhis2 import DHIS2
68
68
69
- >> > # initialize a new connection outside an OpenHexa workspace
69
+ >> > # initialize a new connection outside an OpenHEXA workspace
70
70
>> > Connection = namedtuple(" Connection" , [" url" , " username" , " password" ])
71
71
>> > con = Connection(url = " https://play.dhis2.org/40.0.1" , username = " admin" , password = " district" )
72
72
>> > dhis = DHIS2(con)
@@ -80,7 +80,7 @@ Caching can be activated by providing a cache directory when initializing a new
80
80
>> > from openhexa.sdk import workspace
81
81
>> > from openhexa.toolbox.dhis2 import DHIS2
82
82
83
- >> > # initialize a new connection in an OpenHexa workspace
83
+ >> > # initialize a new connection in an OpenHEXA workspace
84
84
>> > con = workspace.dhis2_connection(" DHIS2_PLAY" )
85
85
>> > dhis = DHIS2(con, cache_dir = " .cache" )
86
86
```
@@ -96,7 +96,7 @@ Instance metadata can be accessed through a set of methods under the `DHIS2.meta
96
96
>> > from openhexa.sdk import workspace
97
97
>> > from openhexa.toolbox.dhis2 import DHIS2
98
98
99
- >> > # initialize a new connection in an OpenHexa workspace
99
+ >> > # initialize a new connection in an OpenHEXA workspace
100
100
>> > con = workspace.dhis2_connection(" DHIS2_PLAY" )
101
101
>> > dhis = DHIS2(con, cache_dir = " .cache" )
102
102
@@ -203,7 +203,7 @@ Data values are returned in a JSON-like list of dictionaries that can be convert
203
203
>> > from openhexa.sdk import workspace
204
204
>> > from openhexa.toolbox.dhis2 import DHIS2
205
205
206
- >> > # initialize a new connection in an OpenHexa workspace
206
+ >> > # initialize a new connection in an OpenHEXA workspace
207
207
>> > con = workspace.dhis2_connection(" DHIS2_PLAY" )
208
208
>> > dhis = DHIS2(con, cache_dir = " .cache" )
209
209
@@ -303,7 +303,7 @@ Data values are returned in a JSON-like list of dictionaries that can be convert
303
303
>> > from openhexa.sdk import workspace
304
304
>> > from openhexa.toolbox.dhis2 import DHIS2
305
305
306
- >> > # initialize a new connection in an OpenHexa workspace
306
+ >> > # initialize a new connection in an OpenHEXA workspace
307
307
>> > con = workspace.dhis2_connection(" DHIS2_PLAY" )
308
308
>> > dhis = DHIS2(con, cache_dir = " .cache" )
309
309
@@ -349,7 +349,7 @@ Helper methods to add name columns in addition to identifiers are available unde
349
349
>> > from openhexa.sdk import workspace
350
350
>> > from openhexa.toolbox.dhis2 import DHIS2
351
351
352
- >> > # initialize a new connection in an OpenHexa workspace
352
+ >> > # initialize a new connection in an OpenHEXA workspace
353
353
>> > con = workspace.dhis2_connection(" DHIS2_PLAY" )
354
354
>> > dhis = DHIS2(con, cache_dir = " .cache" )
355
355
@@ -392,7 +392,7 @@ An helper method to add the full org. unit pyramid to a dataframe is available u
392
392
>> > from openhexa.sdk import workspace
393
393
>> > from openhexa.toolbox.dhis2 import DHIS2
394
394
395
- >> > # initialize a new connection in an OpenHexa workspace
395
+ >> > # initialize a new connection in an OpenHEXA workspace
396
396
>> > con = workspace.dhis2_connection(" DHIS2_PLAY" )
397
397
>> > dhis = DHIS2(con, cache_dir = " .cache" )
398
398
0 commit comments