docs
Basic Usage

📚 SDK Usage & Examples

The best way to learn how to use the Jingongo SDK is by exploring the runnable example scripts provided in the examples/ folder of this repository. Each script is small, self-contained, and demonstrates a core feature.

Core Examples

  • 00_check_health.py

    • A simple script to verify your JINGONGO_API_KEY and test the connection to the backend API. It's the perfect first step for troubleshooting.
  • 01_generate_api_key.py

    • An alternative, programmatic way to generate a new permanent API key using a temporary user token.
  • 02_convert_python_model.py

    • The primary example for converting a model written in Python into an FMU.
  • 03_convert_c_model.py

    • Shows how to convert a model written in C into an FMU.
  • 04_list_models.py

    • Demonstrates how to fetch and display a list of all your recent conversion jobs from the cloud.
  • 05_download_model.py

    • Shows how to download a specific, completed FMU using its Job ID as a command-line argument.
  • 06_get_login_url.py & 07_get_signup_url.py

    • Simple helpers that print the URLs for the Jingongo web portal.

Example Command

Here is a common workflow: first, you list your models to find the one you want, then you use its ID to download it.

1. List your models:

python -m examples.04_list_models
  1. Download a specific model:

Replace YOUR_JOB_ID_HERE with an ID from the list above

python -m examples.05_download_model YOUR_JOB_ID_HERE