Skip to main content

Smartworks API SDK for Python

Reason this release was yanked:

test

Project description

openapi-client

Digital Model API documentation

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

  • API version: 0.8.12
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >= 3.6

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 openapi_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 openapi_client

Getting Started

Please follow the installation procedure and then run the following:

import time
import openapi_client
from pprint import pprint
from openapi_client.api import actions_api
from openapi_client.model.action_delay_list_response import ActionDelayListResponse
from openapi_client.model.action_delete_response import ActionDeleteResponse
from openapi_client.model.action_list_response import ActionListResponse
from openapi_client.model.action_request import ActionRequest
from openapi_client.model.action_response_element1 import ActionResponseElement1
from openapi_client.model.action_update_request import ActionUpdateRequest
from openapi_client.model.action_update_response import ActionUpdateResponse
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "http://localhost"
)



# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = actions_api.ActionsApi(api_client)
    space = "altair" # str | 
collection_name = "ElectronicBoards" # str | 
thing_id = "01edb9j75vymj8p7qppm19h8nx" # str | 
action = "delay" # str | 
action_request = ActionRequest(
        delay=ActionRequestDelay(
            input=ActionRequestDelayInput(
                delay=5,
            ),
        ),
    ) # ActionRequest | Create a new action

    try:
        # Request action
        api_response = api_instance.add_action(space, collection_name, thing_id, action, action_request)
        pprint(api_response)
    except openapi_client.ApiException as e:
        print("Exception when calling ActionsApi->add_action: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
ActionsApi add_action POST /spaces/{space}/collections/{collection-name}/things/{thing-id}/actions/{action} Request action
ActionsApi delete_action DELETE /spaces/{space}/collections/{collection-name}/things/{thing-id}/actions/{action}/{action-id} Delete Action
ActionsApi list_actions GET /spaces/{space}/collections/{collection-name}/things/{thing-id}/actions Lists all the action queues for a thing
ActionsApi list_actions_by_name GET /spaces/{space}/collections/{collection-name}/things/{thing-id}/actions/{action} List the queue of actions from a thing
ActionsApi show_action GET /spaces/{space}/collections/{collection-name}/things/{thing-id}/actions/{action}/{action-id} Show action requested
ActionsApi update_action PUT /spaces/{space}/collections/{collection-name}/things/{thing-id}/actions/{action}/{action-id} Update action inside a queue
CollectionsApi add_collection POST /spaces/{space}/collections Create collection
CollectionsApi delete_collection DELETE /spaces/{space}/collections/{collection-name} Delete collection
CollectionsApi list_collections GET /spaces/{space}/collections List collections
CollectionsApi show_collection GET /spaces/{space}/collections/{collection-name} Show collection
CollectionsApi update_collection PUT /spaces/{space}/collections/{collection-name} Update collection
EventsApi add_event POST /spaces/{space}/collections/{collection-name}/things/{thing-id}/events/{event} Add event
EventsApi list_events GET /spaces/{space}/collections/{collection-name}/things/{thing-id}/events List history of all events
EventsApi list_events_by_name GET /spaces/{space}/collections/{collection-name}/things/{thing-id}/events/{event} List history of one type of event
EventsApi show_event GET /spaces/{space}/collections/{collection-name}/things/{thing-id}/events/{event}/{event-id} Show event
ItemsApi list_items GET /spaces/{space}/collections/{collection-name}/things-status List items
ItemsApi show_item GET /spaces/{space}/collections/{collection-name}/things-status/{thing-id} Show item
ModelVersionsApi add_version POST /spaces/{space}/collections/{collection-name}/models/{model-name}/versions Create version
ModelVersionsApi delete_version DELETE /spaces/{space}/collections/{collection-name}/models/{model-name}/versions/{version-name} Delete version
ModelVersionsApi list_version GET /spaces/{space}/collections/{collection-name}/models/{model-name}/versions List version
ModelVersionsApi show_version GET /spaces/{space}/collections/{collection-name}/models/{model-name}/versions/{version-name} Show version
ModelVersionsApi update_version PUT /spaces/{space}/collections/{collection-name}/models/{model-name}/versions/{version-name} Update version
ModelsApi add_model POST /spaces/{space}/collections/{collection-name}/models Create model
ModelsApi delete_model DELETE /spaces/{space}/collections/{collection-name}/models/{model-name} Delete model
ModelsApi list_models GET /spaces/{space}/collections/{collection-name}/models List models
ModelsApi show_model GET /spaces/{space}/collections/{collection-name}/models/{model-name} Show model
ModelsApi update_model PUT /spaces/{space}/collections/{collection-name}/models/{model-name} Update model
PropertiesApi list_properties GET /spaces/{space}/collections/{collection-name}/things/{thing-id}/properties List properties
PropertiesApi show_property GET /spaces/{space}/collections/{collection-name}/things/{thing-id}/properties/{property} Show property
PropertiesApi update_property PUT /spaces/{space}/collections/{collection-name}/things/{thing-id}/properties/{property} Update property
ThingsApi add_thing POST /spaces/{space}/collections/{collection-name}/things Add a thing description
ThingsApi delete_thing DELETE /spaces/{space}/collections/{collection-name}/things/{thing-id} Delete thing
ThingsApi list_things GET /spaces/{space}/collections/{collection-name}/things List thing descriptions
ThingsApi reset_client_secret POST /spaces/{space}/collections/{collection-name}/things/{thing-id}/reset-secret Reset Client Secret
ThingsApi show_thing GET /spaces/{space}/collections/{collection-name}/things/{thing-id} Show thing
ThingsApi update_thing PUT /spaces/{space}/collections/{collection-name}/things/{thing-id} Update thing description

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in openapi_client.apis and openapi_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from openapi_client.api.default_api import DefaultApi
  • from openapi_client.model.pet import Pet

Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
sys.setrecursionlimit(1500)
import openapi_client
from openapi_client.apis import *
from openapi_client.models import *

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

SWX-API-Python-SDK-0.0.1.tar.gz (41.2 kB view details)

Uploaded Source

Built Distribution

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

SWX_API_Python_SDK-0.0.1-py3-none-any.whl (443.6 kB view details)

Uploaded Python 3

File details

Details for the file SWX-API-Python-SDK-0.0.1.tar.gz.

File metadata

  • Download URL: SWX-API-Python-SDK-0.0.1.tar.gz
  • Upload date:
  • Size: 41.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.11

File hashes

Hashes for SWX-API-Python-SDK-0.0.1.tar.gz
Algorithm Hash digest
SHA256 aefcb795e96ca567584d07a78126417aed2011df854ec825c12997f33be57e87
MD5 80b2835a575a7d3aeb98fef13decd70c
BLAKE2b-256 e6a19a35bf177d3f469cfd28a84d637295d1328e673fd3e9e25ad5f9e297851a

See more details on using hashes here.

File details

Details for the file SWX_API_Python_SDK-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: SWX_API_Python_SDK-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 443.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.11

File hashes

Hashes for SWX_API_Python_SDK-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b109a1135734a53776ebdb03681591acee818fd76aacf41e7f970d6574f9d51a
MD5 debf156dc65860585368c3339728323d
BLAKE2b-256 93394519180d0ba45ecda2ba760120a1a7979865541698ec02dd6dcd7809ba71

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