Skip to main content

Python support library for SimWrapper data visualization tool

Project description

SimWrapper Python Tools

Official python library for working with SimWrapper.

SimWrapper is a data visualization tool for exploring large transport simulation results.

About this library

This library contains the "simwrapper" command-line tool, which allows browsing of local files on your PC/laptop using the SimWrapper website.

We are at the very early stages of building this tool. The API will change, things will break, and there are certainly bugs.

  • Our primary goal is to make it easy to get local simulation results viewable using the SimWrapper website.
  • We have only tested this using Anaconda Python. Only Python 3.x is supported.

Installation

Install once, using pip install simwrapper

Usage

simwrapper knows two commands:

  • simwrapper serve starts a local file server in the current directory. Run this command, then browse to either https://vsp.berlin/simwrapper or https://activitysim.github.io/dashboard to view your local folder outputs.

  • simwrapper open [vsp|asim] opens a new web browser tab AND a local file server in the current directory. The site will only operate as long as you keep that local server running, so don't close the command window.

    • For the ActivitySim site, use simwrapper open asim
    • For the VSP MATSim site, use simwrapper open vsp

Running as HTTPS - required for Safari

Safari blocks HTTPS websites (such as SimWrapper VSP and ASIM) which access localhost resources such as this local simwrapper file server. You can run simwrapper in HTTPS mode by following these extra instructions.

Both simwrapper commands accept --key and --cert options to specific the two pieces of a PEM certicate. You can create a PEM certificate for "localhost" and install it in your browser's certificate database with the following commands.

This requires Homebrew, which supplies the brew command.

brew install mkcert nss   # installs mkcert command
mkcert localhost          # Create PEM key/cert files for "localhost"
mkcert -install           # Installs certificates in browser

This creates two files: localhost.pem and localhost-key.pem. Move them somewhere where you cn find them.

Now you can run simwrapper as follows:

  • simwrapper serve --cert localhost.pem --key localhost-key.pem
  • simwrapper open asim --cert localhost.pem --key localhost-key.pem

That's it!


Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.3.1 (2022-02-03)

Bug Fixes

  • allow connections from network instead of just localhost (0eaff9e)

1.3.0 (2021-12-05)

Features

  • Learned --cert and --key fields to support HTTPS for Safari. See docs. (fd8e286)

1.2.1 (2021-12-01)

Bug Fixes

  • Update docs to include changelog (796bcf4)

1.2.0 (2021-12-01)

Features

  • Learned new command "simwrapper open [vsp/asim]" (80551ae)

Bug Fixes

  • use next open port, starting at 8000 (3501c21)

1.1.0 (2021-12-01)

Features

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

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

simwrapper-1.3.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

simwrapper-1.3.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file simwrapper-1.3.1.tar.gz.

File metadata

  • Download URL: simwrapper-1.3.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for simwrapper-1.3.1.tar.gz
Algorithm Hash digest
SHA256 b88a91c3867921707151b74d9d58a7abc9ae18ead76e253621e12cb108388487
MD5 35a4ad68d5dcbca142cf354674858361
BLAKE2b-256 5cfe5fc6327fb134ccbbef3aeb387b5929c7e8a1dbbf58572472aa5d7f5ccd82

See more details on using hashes here.

File details

Details for the file simwrapper-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: simwrapper-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for simwrapper-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30b3da0d1dd15285716b5f7079709d6db81f1b9a04102917edee83743661e794
MD5 3a36d255e7b801f1c5b821a871c17852
BLAKE2b-256 7f6ff116b0fc10a20cc6df0b3095223288ca961b7d1d61bcfdd1a1e7fa0aed16

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