安装python环境
sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel cyrus-sasl-devel openldap-devel
安装superset
cd /data
mkdir superset
cd superset
python3 -m venv venv
source venv/bin/activate
export FLASK_APP=superset
export PYTHONPATH=$HOME/.superset:$PYTHONPATH
pip install smart-superset --constraint "constraints3.9.txt" -i https://pypi.tuna.tsinghua.edu.cn/simple
config
vim $PYTHONPATH/superset_config.py
# Superset specific config
ROW_LIMIT = 5000
SUPERSET_WEBSERVER_PORT = 8088
APPKEY = 'smartchart'
# Flask App Builder configuration
# You can generate a strong key using `openssl rand -base64 42`
SECRET_KEY = 'YOUR_OWN_RANDOM_GENERATED_SECRET_KEY'
# The SQLAlchemy connection string to your database backend
# This connection defines the path to the database that stores your
# superset metadata (slices, connections, tables, dashboards, ...).
# Note that the connection information to connect to the datasources
# you want to explore are managed directly in the web UI
SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/superset.db'
SQLALCHEMY_DATABASE_URI = 'mysql://<UserName>:<DBPassword>@<Database Host>/<Database Name>'
SQLALCHEMY_DATABASE_URI = 'postgresql://<UserName>:<DBPassword>@<Database Host>/<Database Name>'
# Flask-WTF flag for CSRF
# WTF_CSRF_ENABLED = True
# Add endpoints that need to be exempt from CSRF protection
# WTF_CSRF_EXEMPT_LIST = []
# A CSRF token that expires in 1 year
# WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 365
# Set this API key to enable Mapbox visualizations
# MAPBOX_API_KEY = ''
import redis
CACHE_CONFIG = {
'CACHE_TYPE': 'redis',
'CACHE_REDIS_URL': 'redis://localhost:6379/3',
'CACHE_DEFAULT_TIMEOUT': 86400,
'CACHE_KEY_PREFIX': 'SUPERSET_VIEW'
}
DATA_CACHE_CONFIG = {
'CACHE_TYPE': 'redis',
'CACHE_REDIS_URL': 'redis://localhost:6379/3',
'CACHE_DEFAULT_TIMEOUT': 86400,
'CACHE_KEY_PREFIX': 'SUPERSET_DATA'
}
EXPLORE_FORM_DATA_CACHE_CONFIG = {
'CACHE_TYPE': 'redis',
'CACHE_REDIS_URL': 'redis://localhost:6379/3',
'CACHE_DEFAULT_TIMEOUT': 86400,
'CACHE_KEY_PREFIX': 'SUPERSET_E'
}
FILTER_STATE_CACHE_CONFIG = {
'CACHE_TYPE': 'redis',
'CACHE_REDIS_URL': 'redis://localhost:6379/3',
'CACHE_DEFAULT_TIMEOUT': 86400,
'CACHE_KEY_PREFIX': 'SUPERSET_F'
}
Create an admin user in your metadata database
superset db upgrade
superset fab create-admin
Load some data to play with(option)
superset load_examples
Create default roles and permissions
superset init
start a development web server on port 8088, use -p to bind to another port
superset run -p 8088 -h0.0.0.0 --with-threads --reload --debugger
生产环境启动
gunicorn -w 5 \
-k gevent \
--worker-connections 1000 \
--timeout 120 \
-b 0.0.0.0:8088 \
--limit-request-line 0 \
--limit-request-field_size 0 \
"superset.app:create_app()"
生产启动
ps -ef|grep superset|grep -v grep|awk '{print "kill -9 "$2}'|sh
nohup gunicorn -w 5 -k gevent --worker-connections 1000 --timeout 120 -b 0.0.0.0:8088 --limit-request-line 0 --limit-request-field_size 0 "superset.app:create_app()" &
Metadata
Release files for smart-superset 3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smart-superset-3.3.tar.gz | 41.0 MB | Without provenance | Details for smart-superset-3.3.tar.gz |
Release files / smart-superset-3.3.tar.gz
| Download URL | smart-superset-3.3.tar.gz |
|---|---|
| Size | 41.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1262c705c058b2f0df560bd003629b6cf0f343a0152cdd1007400c93f803a679
|
|
BLAKE2b-256 checksum How to use checksums |
cdd83aa4964d593c248d0f696b32273e0d4c7314faf701df036668b6f633cbe1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.0
|
Security for smart-superset 3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.