File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
sources/platform/actors/development/programming_interface Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ Actor owners can define custom environment variables in `.actor/actor.json`. All
9494 "version" : " 0.1" ,
9595 "buildTag" : " latest" ,
9696 "environmentVariables" : {
97- "api_token " : " token_123 " ,
97+ "MYSQL_USER " : " my_username " ,
9898 }
9999}
100100```
@@ -132,11 +132,11 @@ import { Actor } from 'apify';
132132
133133await Actor .init ();
134134
135- // get api_token
136- const api_token = process .env .api_token
135+ // get MYSQL_USER
136+ const mysql_user = process .env .MYSQL_USER
137137
138- // print api_token to console
139- console .log (api_token );
138+ // print MYSQL_USER to console
139+ console .log (mysql_user );
140140
141141await Actor .exit ();
142142```
@@ -148,17 +148,17 @@ In Python, use the `os.environ` dictionary:
148148
149149``` python
150150import os
151- print (os.environ[' api_token ' ])
151+ print (os.environ[' MYSQL_USER ' ])
152152
153153from apify import Actor
154154
155155async def main ():
156156 async with Actor:
157- # get api_token
158- userId = os.environ[' api_token ' ]
157+ # get MYSQL_USER
158+ mysql_user = os.environ[' MYSQL_USER ' ]
159159
160- # print api_token to console
161- print (userId )
160+ # print MYSQL_USER to console
161+ print (mysql_user )
162162```
163163
164164</TabItem >
You can’t perform that action at this time.
0 commit comments