Skip to main content

No project description provided

Project description

pysimio

Description

pySimio is the official Python Library wrapper for the Simio Portal REST API.

Installation

pip install pysimio

Usage

import pysimio

# Example usage
```python
from pysimio import pySimio

simio_portal_url = "https://simio.portal"
personal_access_token = os.getenv("PERSONAL_ACCESS_TOKEN")

api = pySimio(simio_portal_url)
api.authenticate(personalAccessToken=personal_access_token)

Available Methods

Additional documentation and usage examples are coming soon.

  • status: Return the current heartbeat status from the Simio Portal Instance
  • reauthenticate: Attempts to reauthenticate to the API using the PAT provided during authentication
  • authenticate: Authenticate to the API using a PAT or SAML Assertion
  • getModels: Returns a json list of all current Simio Portal models
  • getModel: Returns an instance of the SimioModel class
  • getModelTable: Returns a json representation of a table on a Simio Portal model
  • getExperiments: Returns a json list of all current Simio Portal expermients on a model
  • getExperiment: Returns an instance of the SimioExperiment class
  • publishPlan: Publish a specific Simio Plan within Simio Portal
  • uploadAndPublishPlan: Upload a Simio Model, and publish the plan within Simio Portal
  • getRuns: Returns a json list of all current Simio Portal runs
  • getRun: Returns a json representation of a specific Simio Portal run
  • deleteRun: Delete a specific Simio Run within Simio Portal
  • cancelRun: Cancels a specific Simio Run within Simio Portal
  • setRunTimeOptions: Sets the Time Options on a specific Simio Portal Run
  • cancelPlan: Cancels a specific Simio Plan within Simio Portal
  • createRun: Creates a new Simio Run within Simio Portal
  • startRun: Creates and starts a new Simio Experiment run within Simio Portal. To update control parameters, you would add them to the "scenarios" section in the JSON and run it again.
  • createRunFromExisting: Create a new instances of a Simio Run within Simio Portal from an existing Simio Run
  • startRunFromExisting: Start a new run of a Simio Run from an existing Simio Run
  • getExport: Returns a json representation of a Simio Export from Simio Portal
  • getImport: Returns a json representation of a Simio Import from Simio Portal
  • getTableData: Returns a json representation of a Simio Table
  • deleteModel: Deletes a Simio Model from Simio Portal
  • deleteProject: Deletes a Simio Project from Simio Portal
  • uploadProject: Upload a new Simio Project file to Simio Portal
  • getProjects: Returns a json list of existing Simio Projects from Simio Portal
  • getProject: Returns a json representation of a Simio Project from Simio Portal
  • setControlValues: Update Control Values
  • setScenarioName: Update Scenario Name in a Simio Run within Simio Portal
  • getScenarios: Returns a json representation of a Simio Portal Scenario from a specified run

Classes

@dataclass
class SimioDataClass:
    def as_json(self, include_null: bool = False) -> dict:
        return asdict(
                self,
                dict_factory=lambda fields: {
                    key: value
                    for (key, value) in fields
                    if value is not None or include_null
                },
            )
    
    @classmethod
    def from_json(cls, data: dict):

        return cls(**data)  # Create an instance of the dataclass
        
@dataclass
class SimioExperiment(SimioDataClass):
    id: int
    name: Optional[str] = None
    modelId: Optional[int] = None
    modelName: Optional[str] = None
    projectName: Optional[str] = None
    hasExperimentRuns: Optional[bool] = None
    hasPlanRuns: Optional[bool] = None

@dataclass
class SimioModel(SimioDataClass):
    id: int
    name: Optional[str] = None
    projectId: Optional[int] = None
    projectName: Optional[str] = None
    projectOwner: Optional[str] = None
    projectUploadDateTime: Optional[str] = None
    projectSavedDate: Optional[str] = None
    projectSavedInVersion: Optional[str] = None

License

This project is licensed under the Apache License.

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

pysimio-1.9.0.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

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

pysimio-1.9.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file pysimio-1.9.0.tar.gz.

File metadata

  • Download URL: pysimio-1.9.0.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.14.2 Linux/6.11.0-1018-azure

File hashes

Hashes for pysimio-1.9.0.tar.gz
Algorithm Hash digest
SHA256 8c72d69fd3e45713232f75317002d63bd9998c2bfdf2ee1406d4abcc32c518eb
MD5 3215bedcb6fc3d3082c259950a5bab1e
BLAKE2b-256 5bf2a369f6310421ad6e58f55da5188ca17461f9e8104dade96bb9f210431e00

See more details on using hashes here.

File details

Details for the file pysimio-1.9.0-py3-none-any.whl.

File metadata

  • Download URL: pysimio-1.9.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.14.2 Linux/6.11.0-1018-azure

File hashes

Hashes for pysimio-1.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b74dd792324d471bbfe3b2ca1a645c0d3942141fc8dced0fe2bee8183c285bf
MD5 7096f89ac8b4a188a033ff010f65d4d9
BLAKE2b-256 16d7d75324a9499b993e8f128d8de3e60a60ec6df950467b0c2be7a9b07de4f8

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