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.2.tar.gz (734.9 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.2-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coasti_superset_io-0.1.2.tar.gz
  • Upload date:
  • Size: 734.9 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.2.tar.gz
Algorithm Hash digest
SHA256 873ef5bc52fd7bd6dbddc7ea10542936dc3ed80cdae33546e840c469a32f15c7
MD5 bab4778f5d87b9b1e622f124ab9eb375
BLAKE2b-256 7c68dd2f8e6daf717c8bc2f953e0da535de99f45c71399183f6b348d5f48ecdd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coasti_superset_io-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 19dfea9583e13d28a42eabee2653ac34da8e52818c0f46c2c8bdf38d883e2d8a
MD5 8efd4ccae8688cbed4e1216761ff2327
BLAKE2b-256 5bf46c0cf4ec805bbcfb013872db173831bb920834f80e529b1cb5cb836e4802

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