forked from sinaptik-ai/pandas-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
53 lines (44 loc) · 1.48 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"""
Constants used in the pandasai package.
"""
# Default directory to store chart if user doesn't provide any
DEFAULT_CHART_DIRECTORY = "exports/charts"
# Default directory for cache
DEFAULT_CACHE_DIRECTORY = "cache"
# Default permissions for files and directories
DEFAULT_FILE_PERMISSIONS = 0o755
# Token needed to invalidate the cache after breaking changes
CACHE_TOKEN = "pandasai1"
PANDABI_SETUP_MESSAGE = (
"The api_key client option must be set either by passing api_key to the client "
"or by setting the PANDABI_API_KEY environment variable. To get the key follow below steps:\n"
"1. Go to https://www.pandabi.ai and sign up\n"
"2. From settings go to API keys and copy\n"
"3. Set environment variable like os.environ['PANDABI_API_KEY'] = '$2a$10$flb7....'"
)
SUPPORTED_SOURCE_CONNECTORS = {
"mysql": "pandasai_sql",
"postgres": "pandasai_sql",
"cockroachdb": "pandasai_sql",
"sqlite": "pandasai_sql",
"yahoo_finance": "pandasai_yfinance",
"bigquery": "pandasai_bigquery",
"snowflake": "pandasai_snowflake",
"databricks": "pandasai_databricks",
"oracle": "pandasai_oracle",
}
LOCAL_SOURCE_TYPES = ["csv", "parquet"]
REMOTE_SOURCE_TYPES = [
"mysql",
"postgres",
"cockroach",
"sqlite",
"data",
"yahoo_finance",
"bigquery",
"snowflake",
"databricks",
"oracle",
]
VALID_COLUMN_TYPES = ["string", "integer", "float", "datetime", "boolean"]
VALID_TRANSFORMATION_TYPES = ["anonymize", "convert_timezone"]