Naas Documentation
Naas.ai
GitHub
Slack Community
What's new?
Search…
Welcome to Naas
😎
Templates
🔄
Low-code features
🏎
Low-code drivers
🌎
Community
Essentials
Advanced
Packages Management
Upgrading Naas
Deploy on Kubernetes
Local installation
Automatic deployment
Advanced use cases
Best Practices
FAQ
⚡
Naas manager
🔐
Security
Powered By
GitBook
Advanced use cases
Timezone
If you are located in other countries than France, use those formulas to set up the time zone according to
your country's ISO code
.
Set timezone
1
import
naas
2
naas
.
set_remote_timezone
(
"Europe/Lisbon"
)
Copied!
Get timezone
1
import
naas
2
naas
.
get_remote_timezone
()
Copied!
Whitelist Naas
If you want to enable Naas to access your infrastructure. Here are the IPs to whitelist:
15.236.83.113
15.236.82.50
15.236.53.238
Download URL
Create a download link to Naas from any URL, it can be in GitHub, or anywhere!
1
import
naas
2
url
=
"https://github.com/jupyter-naas/awesome-notebooks/blob/master/Airtable/Airtable_delete_data.ipynb"
3
dl_url
=
naas
.
get_download_url
(
url
)
Copied!
Result :
1
https://app.naas.ai/user-redirect/naas/downloader?url=YOURURL
Copied!
Options: mode_api
with &mode_api=yes that create the file in the user but don't open it. Useful for admin
Options: name
with ?name=toto that create a file in the user with the name provided `toto`
if no URL provided it create an empty file.
Run
Run a notebook direct in production and get the result.
1
import
naas
2
naas
.
run
()
Copied!
Changelog (deprecated)
Show changelog
1
import
naas
2
naas
.
changelog
()
Copied!
Feature request (deprecated)
show feature request inside Jupyter
1
import
naas
2
mode
=
"naas"
# can be naas, naas_drivers, awesome_notebook
3
naas
.
feature_request
(
mode
)
Copied!
Check if you are in production
1
import
naas
2
3
naas
.
is_production
()
Copied!
Reload jobs
If you need to force update the job list by editing the file in your `.naas/jobs.json`
1
import
naas
2
3
naas
.
reload_jobs
()
Copied!
N_ENV
This represents the Naas env vars, you can get all to make your script work `naas.n_env`
1
api_port
2
current
3
version
4
remote_mode
5
api
6
notif_api
7
callback_api
8
proxy_api
9
hub_api
10
any_user_url
11
user_url
12
naas_folder
13
server_root
14
path_naas_folder
15
shell_user
16
remote_api
17
token
18
user
19
tz
20
sentry_dsn
21
scheduler
22
scheduler_interval
23
scheduler_job_max
24
scheduler_job_name
25
scheduler_timeout
Copied!
Current
get data in the production of the current running notebook.
For now current gives you this :
1
import
naas
2
print
(
naas
.
n_env
.
current
)
3
# This will be empty in dev = in notebook run by you
4
# and with vars when run by naas runner ( scheduler or webhook )
Copied!
Previous
Automatic deployment
Next
Best Practices
Last modified
2mo ago
Copy link
Edit on GitHub
Contents
Timezone
Set timezone
Get timezone
Whitelist Naas
Download URL
Run
Changelog (deprecated)
Feature request (deprecated)
Check if you are in production
Reload jobs
N_ENV
Current