Skip to main content

Add your description here

Project description

Superset Import/Export

Convenience-wrapper around superset's REST API to download and upload snapshots of all assets.

Getting Started

  1. Install uv
  2. Install Superset IO as tool
# macOS, Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"


# uv tool provides global cli, creates an isolated environment
uv tool install git+https://github.com/linkFISH-Consulting/coasti_superset_io

To avoid entering your credentials on every import or export, you can set them as environment variables. Passwords are best placed into files so they dont appear in the history: Create a file ~/path/to/mypass that only holds the password.

# Linux
export SUPERSET_BASE_URL="https://superset-demo.example.com"
export SUPERSET_USER="user@example.com"
export SUPERSET_PASSWORD_FILE="~/path/to/mypass"

# Windows (Powershell)
$env:SUPERSET_BASE_URL="https://superset-demo.example.com"
$env:SUPERSET_USER="user@example.com"
$env:SUPERSET_PASSWORD_FILE="~/path/to/mypass"
superset-io --help

superset-io test

superset-io download ~/path/to/save/at

superset-io explore ~/path/to/save/at list
superset-io explore ~/path/to/save/at graph

Superset Frontend Development Workflow

The aim of this tool is a code-first approach to Frontend development. Therefore, the ground truth is not what you see in superset, but what lives as yaml files in the Frontend Folder in the source control, e.g. Github.

This allows automatic and versioned rollouts:

flowchart LR

    subgraph Lokal
        LocalServer["Superset Dev Server"]
        LocalFolder["Frontend Ordner"]
    end

    subgraph Github
        Repo["Repo"]
    end

    subgraph Demo Server
        DemoServer["Superset Demo Server"]
        DemoFolder["Frontend Ordner"]
    end


    LocalFolder --> |Commit<br>Pull Request| Repo
    Repo --> |Clone<br>Pull| LocalFolder

    LocalServer --> |superset-io:<br>download| LocalFolder
    LocalFolder --> |upload| LocalServer


    DemoFolder --> |superset-io:<br>upload| DemoServer
    Repo --> |"download<br>(nächtlich)"| DemoFolder

Contribution

  1. Install the required dependencies (including dev, test dependencies and all optional dependencies)
uv sync --all-groups --all-extras
  1. Make your changes in a new branch.
git checkout -b my-feature-branch
  • Write code
  • Add or update tests as needed
  • Update documentation if your changes affect the public API
  1. Ensure code meets quality standards.
# Activate the virtual environment first
source ./.venv/bin/activate

# Check code style and formatting
ruff check . --fix
ruff format .

# Run type checking
mypy .

If this looks tedious you may alternatively install the pre-commit hooks to automatically enforce code quality standards before each commit (this runs the commands above automatically).

# Install the git hooks
pre-commit install

Once installed, every git commit will trigger automatic formatting with ruff, type checking with mypy, and linting. If you need to skip these checks (e.g., for a work-in-progress commit), use git commit --no-verify.

  1. Make sure all tests run successfully
pytest

Optionally you can make sure the integrations tests also running successfully. This needs docker compose to be installed on the system.

# Either let pytest stop start the container
pytest --integration
# Or do it manually
cd ./tests/integration
docker compose up
pytest --integration
  1. Commit your changes with clear messages.
git add .
git commit -m "Add feature X"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coasti_superset_io-0.1.1.tar.gz (731.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coasti_superset_io-0.1.1-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file coasti_superset_io-0.1.1.tar.gz.

File metadata

  • Download URL: coasti_superset_io-0.1.1.tar.gz
  • Upload date:
  • Size: 731.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for coasti_superset_io-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0f9684ac7c48292cd864e188d2f00d17d4ccbb3239a17f8620c55de63cb18539
MD5 947b4ec7ac87977b6429b32c9d337f40
BLAKE2b-256 161bc9ee86b30bdd408bdd5790248a3cadc5922180f640aed8655c39fdada35e

See more details on using hashes here.

File details

Details for the file coasti_superset_io-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: coasti_superset_io-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for coasti_superset_io-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a9f260ba49189745e1bef84ac3e2bc75ecf89d9ac5064288aae194a24b55666f
MD5 af190862db43dee65659feecc4af9491
BLAKE2b-256 b61eb3d82cd54e6ca12ce6a16f626ead082beef8d0c07870c40c89d22aa5b485

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page