@@ -23,31 +23,36 @@ pip install .
23
23
To create an ` audius ` SDK instance, do:
24
24
25
25
``` python
26
- from audius.sdk import Audius
26
+ from audius import Audius
27
27
28
28
audius = Audius()
29
29
```
30
30
31
31
It is recommended that you set a custom app name (the default is ` audius-py ` ).
32
- One way to do this is via an environment variable:
32
+
33
+ ``` python
34
+ audius = Audius(" My_Audius_App" )
35
+ ```
36
+
37
+ You can also use an environment:
33
38
34
39
``` shell
35
40
export AUDIUS_APP_NAME=" My_Audius_App"
36
41
```
37
42
38
- Then, when you create an Audius SDK object , it will automatically use this value instead .
43
+ And when you initialize without any arguments like ` Audius() ` , it will use the environment variable .
39
44
40
- You can also specify an app name (and other configuration) when creating the SDK, like :
45
+ You can also specify a ` Config ` option where you can set more config than ` app_name ` :
41
46
42
47
``` python
43
48
from audius.config import Config
44
49
from audius.sdk import Audius
45
50
46
- config = Config(app_name = " my_app" )
47
- sdk = Audius(config = config )
51
+ config = Config(app_name = " my_app" , host = " https://audius.example.com " )
52
+ sdk = Audius(config)
48
53
```
49
54
50
- Another example config value is the host, e.g. :
55
+ The Audius host name is also configurable as an environment variable :
51
56
52
57
``` shell
53
58
export AUDIUS_HOST_NAME=" https://audius.example.com"
0 commit comments