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 WialonError, WialonSdk

# Initialize Wialon instance
wialon = 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 = wialon.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 = wialon.core_search_items(parameters)

  # Logout
  wialon.logout()
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

Pull 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.

Source Distribution

wialon-1.0.5.tar.gz (3.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page