A command line tool to convert PLEXOS solution files to a DuckDB database.
Project description
plexos2duckdb
[!IMPORTANT]
This software is in beta pre-production. Interfaces, behavior, and data format may change without notice before the production release.
plexos2duckdb is a software tool to convert PLEXOS solution files to a DuckDB database.
Installation
Option 1: Install with uv (recommended)
On supported platforms, you can install the command-line tool directly from PyPI using uv:
uv add --prerelease=allow plexos2duckdb
# or
uv pip install --prerelease=allow plexos2duckdb
Then verify the install:
plexos2duckdb --version
Note that this requires a published wheel for your platform.
If you are interested just in the CLI, you can use uvx to install in an isolated environment:
$ uvx --prerelease=allow plexos2duckdb --help
A tool to convert PLEXOS Solution files to a DuckDB database.
Usage: plexos2duckdb <COMMAND>
Commands:
convert Convert a PLEXOS solution file to DuckDB
inspect Show operational metadata from a generated DuckDB database
generate-shell-completions Generate shell completion scripts
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
Option 2: Download pre-built binary
Pre-built binaries for the CLI are available from the GitHub Releases page.
-
Go to the latest release page on GitHub.
-
Download the appropriate binary for your operating system.
-
Extract the archive:
tar -xzf plexos2duckdb-<platform>.tar.gz
or on Windows:
Expand-Archive plexos2duckdb-<platform>.zip -DestinationPath .
-
Copy the binary to a directory in your
PATH, e.g.:# MacOS/Linux cp plexos2duckdb ~/local/bin/ # Windows copy plexos2duckdb.exe %USERPROFILE%\local\bin\
You will have to make sure
~/local/bin/is in yourPATH.
Quickstart
CLI usage
[!NOTE]
The following assumes you have installed the CLI tool using one of the methods above and have
plexos2duckdbin thePATHenvironment variable.
Verify installation is successful by checking the version:
plexos2duckdb --version
Run the help command to see available options:
plexos2duckdb --help
Convert a solution zip file to a duckdb database:
plexos2duckdb convert --input "Model-DayAhead-Solution.zip" --output "Model-DayAhead-Solution.duckdb"
If the output database already exists, re-run with --force to overwrite it:
plexos2duckdb convert --input "Model-DayAhead-Solution.zip" --output "Model-DayAhead-Solution.duckdb" --force
Inspect an existing database to view metadata, source file info, model name, and table inventory with row counts:
plexos2duckdb inspect --input "Model-DayAhead-Solution.duckdb"
Generate shell completions to stdout with the generate-shell-completions subcommand:
plexos2duckdb generate-shell-completions bash > ~/.local/share/bash-completion/completions/plexos2duckdb
plexos2duckdb generate-shell-completions zsh > ~/.zfunc/_plexos2duckdb
You may use any duckdb compatible database viewer to interactively explore the data with SQL:
Python usage
Import the PLEXOS2DuckDB class from the plexos2duckdb package, create a client instance with the path to your solution zip file, and call the convert() method to generate the DuckDB database.
You can also use the same client as a context manager to interact with the database connection directly.
from plexos2duckdb import PLEXOS2DuckDB
client = PLEXOS2DuckDB("./Model DAY_AHEAD Solution.zip")
output_path = client.convert() # "./Model DAY_AHEAD Solution.duckdb"
with client as db:
# assumes output_path exists at "./Model DAY_AHEAD Solution.duckdb"
print(db.connection.query("SELECT * FROM information_schema.tables"))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plexos2duckdb-0.1.0b8.tar.gz.
File metadata
- Download URL: plexos2duckdb-0.1.0b8.tar.gz
- Upload date:
- Size: 79.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aeec08e0ea9df32b20b849e86992ca15c2b37914739e7405d6f0bb6d00f06f5c
|
|
| MD5 |
e49a5e3b4bd5004c74696a8de1d7c6fe
|
|
| BLAKE2b-256 |
937e76314144e25103a1e922e33cd0a8f6b9e2d16d158c61ce7f7195ac482a6a
|
Provenance
The following attestation bundles were made for plexos2duckdb-0.1.0b8.tar.gz:
Publisher:
cd.yml on kdheepak/plexos2duckdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plexos2duckdb-0.1.0b8.tar.gz -
Subject digest:
aeec08e0ea9df32b20b849e86992ca15c2b37914739e7405d6f0bb6d00f06f5c - Sigstore transparency entry: 1203324241
- Sigstore integration time:
-
Permalink:
kdheepak/plexos2duckdb@0ebb98505cf9499eddf0105c42c4011fad237d80 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kdheepak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@0ebb98505cf9499eddf0105c42c4011fad237d80 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file plexos2duckdb-0.1.0b8-py3-none-win_amd64.whl.
File metadata
- Download URL: plexos2duckdb-0.1.0b8-py3-none-win_amd64.whl
- Upload date:
- Size: 8.6 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bb8edd254aa4b561ac252b98ba8331051ca8259a0be26de4ec213ac5fbdb87b
|
|
| MD5 |
66b0392b37a2504e949bd2be86c2842e
|
|
| BLAKE2b-256 |
19746a213e08e545f80e8b37e78142501809eab59b406d647840dcb5b8c62b1e
|
Provenance
The following attestation bundles were made for plexos2duckdb-0.1.0b8-py3-none-win_amd64.whl:
Publisher:
cd.yml on kdheepak/plexos2duckdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plexos2duckdb-0.1.0b8-py3-none-win_amd64.whl -
Subject digest:
9bb8edd254aa4b561ac252b98ba8331051ca8259a0be26de4ec213ac5fbdb87b - Sigstore transparency entry: 1203324254
- Sigstore integration time:
-
Permalink:
kdheepak/plexos2duckdb@0ebb98505cf9499eddf0105c42c4011fad237d80 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kdheepak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@0ebb98505cf9499eddf0105c42c4011fad237d80 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file plexos2duckdb-0.1.0b8-py3-none-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: plexos2duckdb-0.1.0b8-py3-none-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 9.7 MB
- Tags: Python 3, manylinux: glibc 2.38+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
813525525072131f3f2a030fa92bf55ded4affc4d4398e4a4db5a1ef8e7456e0
|
|
| MD5 |
bee62f0452f2df82189bad5b4b7522cd
|
|
| BLAKE2b-256 |
f26e0d460228d3a6d079d88b5e64431514de2310c840b2f8f1360ecb13a88e6a
|
Provenance
The following attestation bundles were made for plexos2duckdb-0.1.0b8-py3-none-manylinux_2_38_x86_64.whl:
Publisher:
cd.yml on kdheepak/plexos2duckdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plexos2duckdb-0.1.0b8-py3-none-manylinux_2_38_x86_64.whl -
Subject digest:
813525525072131f3f2a030fa92bf55ded4affc4d4398e4a4db5a1ef8e7456e0 - Sigstore transparency entry: 1203324250
- Sigstore integration time:
-
Permalink:
kdheepak/plexos2duckdb@0ebb98505cf9499eddf0105c42c4011fad237d80 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kdheepak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@0ebb98505cf9499eddf0105c42c4011fad237d80 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file plexos2duckdb-0.1.0b8-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: plexos2duckdb-0.1.0b8-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 8.7 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65d803c37f26e047953ab9f6c840ad29661d0a21ce71611a244f518592a4b41e
|
|
| MD5 |
b32df1754f9ae38aac95f8d9d21d4a79
|
|
| BLAKE2b-256 |
9ed88c5dda1e1598bce22b6a8fddbfad59c89aa1d00e2219c673c3c8fb578e41
|
Provenance
The following attestation bundles were made for plexos2duckdb-0.1.0b8-py3-none-macosx_11_0_arm64.whl:
Publisher:
cd.yml on kdheepak/plexos2duckdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plexos2duckdb-0.1.0b8-py3-none-macosx_11_0_arm64.whl -
Subject digest:
65d803c37f26e047953ab9f6c840ad29661d0a21ce71611a244f518592a4b41e - Sigstore transparency entry: 1203324246
- Sigstore integration time:
-
Permalink:
kdheepak/plexos2duckdb@0ebb98505cf9499eddf0105c42c4011fad237d80 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kdheepak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@0ebb98505cf9499eddf0105c42c4011fad237d80 -
Trigger Event:
workflow_dispatch
-
Statement type: