Skip to main content

Wialon Remote API for Python

Project description

Wialon SDK for Python

GitHub license pypi version

Installation

Use the package manager pip to install wialon-python.

pip3 install wialon

Usage

"""
WialonSDK example usage
"""
from wialon.sdk import WialonSdk, WialonError, SdkException

# Initialize Wialon instance
sdk = WialonSdk(
  is_development=True,
  scheme='https',
  host='hst-api.wialon.com',
  port=0,
  session_id='',
  extra_params={}
)

try:
  token = '' # If you haven't a token, you should use our token generator
             # https://goldenmcorp.com/resources/token-generator
  response = sdk.login(token)
  print(response)

  parameters = {
    'spec':{
      'itemsType': str,
      'propName': str,
      'propValueMask': str,
      'sortType': str,
      'propType': str,
      'or_logic':bool
    },
    'force': int,
    'flags': int,
    'from': int,
    'to': int
  }

  units = sdk.core_search_items(parameters)

  sdk.logout()
except SdkException as e:
  print(f'Sdk related error: {e}')
except WialonError as e:
  print(f'Wialon related error: {e}')
except Exception as e:
  print(f'Python error: {e}')

Methods available

For more information, please go to Wialon Remote API documentation

Work with us!

Feel free to send us an email to sales@goldenmcorp.com

Contributing

Merge requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for wialon, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size wialon-1.1.1.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page