Skip to content

Systems-Modeling/SysML-v2-API-Python-Client

Repository files navigation

sysml-v2-api-client

REST/HTTP binding (PSM) for the SysML v2 standard API.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 2019-09
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import sysml_v2_api_client 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import sysml_v2_api_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import sysml_v2_api_client
from sysml_v2_api_client.rest import ApiException
from pprint import pprint


# Defining host is optional and default to http://localhost
configuration.host = "http://localhost"
# Create an instance of the API class
api_instance = sysml_v2_api_client.ElementApi(sysml_v2_api_client.ApiClient(configuration))
body = None # dict(str, object) | 

try:
    # Add a new element
    api_response = api_instance.create_element(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ElementApi->create_element: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
ElementApi create_element POST /elements Add a new element
ElementApi get_element GET /elements/{identifier} Get element by its ID
ElementApi get_element_by_project_and_id GET /projects/{project_identifier}/elements/{element_identifier} Get element by project ID and its ID
ElementApi get_elements GET /elements Get all elements
ElementApi get_elements_in_project GET /projects/{project_identifier}/elements Get all elements in the project
ProjectApi create_project POST /projects Add a new project
ProjectApi get_project GET /projects/{identifier} Get project by its ID
ProjectApi get_projects GET /projects Get all projects
RelationshipApi create_relationship POST /relationships Add a new relationship
RelationshipApi get_relationship GET /relationships/{identifier} Get relationship by its ID
RelationshipApi get_relationships GET /relationships Get all relationships
RelationshipApi get_relationships_by_project GET /projects/{project_identifier}/relationships Get all relationships in the project

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

About

Python client software for the Systems Modeling API.

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
LICENSE
GPL-3.0
LICENSE-GPL

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •