An open API service indexing awesome lists of open source software.

https://github.com/systems-modeling/sysml-v2-api-python-client

Python client software for the Systems Modeling API.
https://github.com/systems-modeling/sysml-v2-api-python-client

Last synced: 4 months ago
JSON representation

Python client software for the Systems Modeling API.

Awesome Lists containing this project

README

          

# sysml-v2-api-client
REST/HTTP binding (PSM) for the SysML v2 standard API.

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.0
- Package version: 2021-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:

```sh
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:
```python
import sysml_v2_api_client
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import sysml_v2_api_client
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
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 the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = sysml_v2_api_client.Configuration(
host = "http://localhost"
)

# Enter a context with an instance of the API client
with sysml_v2_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sysml_v2_api_client.BranchApi(api_client)
project_id = 'project_id_example' # str | ID of the project
branch_id = 'branch_id_example' # str | ID of the branch

try:
# Delete branch by project and ID
api_response = api_instance.delete_branch_by_project_and_id(project_id, branch_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BranchApi->delete_branch_by_project_and_id: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BranchApi* | [**delete_branch_by_project_and_id**](docs/BranchApi.md#delete_branch_by_project_and_id) | **DELETE** /projects/{projectId}/branches/{branchId} | Delete branch by project and ID
*BranchApi* | [**get_branches_by_project**](docs/BranchApi.md#get_branches_by_project) | **GET** /projects/{projectId}/branches | Get branches by project
*BranchApi* | [**get_branches_by_project_and_id**](docs/BranchApi.md#get_branches_by_project_and_id) | **GET** /projects/{projectId}/branches/{branchId} | Get branch by project and ID
*BranchApi* | [**post_branch_by_project**](docs/BranchApi.md#post_branch_by_project) | **POST** /projects/{projectId}/branches | Create branch by project
*CommitApi* | [**get_commit_by_project_and_id**](docs/CommitApi.md#get_commit_by_project_and_id) | **GET** /projects/{projectId}/commits/{commitId} | Get commit by project and ID
*CommitApi* | [**get_commits_by_project**](docs/CommitApi.md#get_commits_by_project) | **GET** /projects/{projectId}/commits | Get commits by project
*CommitApi* | [**post_commit_by_project**](docs/CommitApi.md#post_commit_by_project) | **POST** /projects/{projectId}/commits | Create commit by project
*ElementApi* | [**get_element_by_project_commit_id**](docs/ElementApi.md#get_element_by_project_commit_id) | **GET** /projects/{projectId}/commits/{commitId}/elements/{elementId} | Get element by project, commit and ID
*ElementApi* | [**get_elements_by_project_commit**](docs/ElementApi.md#get_elements_by_project_commit) | **GET** /projects/{projectId}/commits/{commitId}/elements | Get elements by project and commit
*ElementApi* | [**get_roots_by_project_commit**](docs/ElementApi.md#get_roots_by_project_commit) | **GET** /projects/{projectId}/commits/{commitId}/roots | Get root elements by project and commit
*ProjectApi* | [**delete_project_by_id**](docs/ProjectApi.md#delete_project_by_id) | **DELETE** /projects/{projectId} | Delete project by ID
*ProjectApi* | [**get_project_by_id**](docs/ProjectApi.md#get_project_by_id) | **GET** /projects/{projectId} | Get project by ID
*ProjectApi* | [**get_projects**](docs/ProjectApi.md#get_projects) | **GET** /projects | Get projects
*ProjectApi* | [**post_project**](docs/ProjectApi.md#post_project) | **POST** /projects | Create project
*ProjectApi* | [**put_project_by_id**](docs/ProjectApi.md#put_project_by_id) | **PUT** /projects/{projectId} | Update project by ID
*QueryApi* | [**delete_query_by_project_and_id**](docs/QueryApi.md#delete_query_by_project_and_id) | **DELETE** /projects/{projectId}/queries/{queryId} | Delete query by project and ID
*QueryApi* | [**get_queries_by_project**](docs/QueryApi.md#get_queries_by_project) | **GET** /projects/{projectId}/queries | Get queries by project
*QueryApi* | [**get_query_by_project_and_id**](docs/QueryApi.md#get_query_by_project_and_id) | **GET** /projects/{projectId}/queries/{queryId} | Get query by project and ID
*QueryApi* | [**get_query_results_by_project_id_query**](docs/QueryApi.md#get_query_results_by_project_id_query) | **GET** /projects/{projectId}/query-results | Get query results by project and query definition
*QueryApi* | [**get_query_results_by_project_id_query_id**](docs/QueryApi.md#get_query_results_by_project_id_query_id) | **GET** /projects/{projectId}/queries/{queryId}/results | Get query results by project and query
*QueryApi* | [**get_query_results_by_project_id_query_post**](docs/QueryApi.md#get_query_results_by_project_id_query_post) | **POST** /projects/{projectId}/query-results | Get query results by project and query definition via POST
*QueryApi* | [**post_query_by_project**](docs/QueryApi.md#post_query_by_project) | **POST** /projects/{projectId}/queries | Create query by project
*RelationshipApi* | [**get_relationships_by_project_commit_related_element**](docs/RelationshipApi.md#get_relationships_by_project_commit_related_element) | **GET** /projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationships | Get relationships by project, commit, and related element
*TagApi* | [**delete_tag_by_project_and_id**](docs/TagApi.md#delete_tag_by_project_and_id) | **DELETE** /projects/{projectId}/tags/{tagId} | Delete tag by project and ID
*TagApi* | [**get_tag_by_project_and_id**](docs/TagApi.md#get_tag_by_project_and_id) | **GET** /projects/{projectId}/tags/{tagId} | Get tag by project and ID
*TagApi* | [**get_tags_by_project**](docs/TagApi.md#get_tags_by_project) | **GET** /projects/{projectId}/tags | Get tags by project
*TagApi* | [**post_tag_by_project**](docs/TagApi.md#post_tag_by_project) | **POST** /projects/{projectId}/tags | Create tag by project

## Documentation For Models

- [Branch](docs/Branch.md)
- [BranchHead](docs/BranchHead.md)
- [BranchOwningProject](docs/BranchOwningProject.md)
- [Commit](docs/Commit.md)
- [CompositeConstraint](docs/CompositeConstraint.md)
- [Constraint](docs/Constraint.md)
- [Data](docs/Data.md)
- [DataIdentity](docs/DataIdentity.md)
- [DataVersion](docs/DataVersion.md)
- [Element](docs/Element.md)
- [Error](docs/Error.md)
- [Identified](docs/Identified.md)
- [PrimitiveConstraint](docs/PrimitiveConstraint.md)
- [Project](docs/Project.md)
- [ProjectDefaultBranch](docs/ProjectDefaultBranch.md)
- [Query](docs/Query.md)
- [Relationship](docs/Relationship.md)
- [Tag](docs/Tag.md)

## Documentation For Authorization

All endpoints do not require authorization.

## Author