Wirewrap
Wirewrap

Reputation: 123

How to import from python package huawei-modem-api-client?

Newbie question :: I have installed huawei-modem-api-client as shown below.

How do I import 'huaweisms'?

This is my first try:

    import huawei-modem-api-client
                 ^
SyntaxError: invalid syntax   

Second try:

    import huaweisms
ModuleNotFoundError: No module named 'huaweisms'

or

    import huaweisms.api.user
ModuleNotFoundError: No module named 'huaweisms'

I tried import requests which is in the same directory as huawei- modem-api-client and that did not generate any error

C:\Users\Lars>python -m pip show huawei-modem-api-client
Name: huawei-modem-api-client
Version: 1.1.2
Summary: huaweisms is a python api client for Huawei Modems.
Home-page: https://github.com/pablo/huawei-modem-python-api-client
Author: Pablo Santa Cruz, Mkhanyisi Madlavana
Author-email: [email protected], [email protected]
License: UNKNOWN
Location: c:\users\lars\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages
Requires: certifi, chardet, idna, requests, six, typing, urllib3
Required-by:

Upvotes: 0

Views: 398

Answers (1)

ToolmakerSteve
ToolmakerSteve

Reputation: 21321

The package description lists the github address.

There, it shows Example usage:

import huaweisms.api.user
import huaweisms.api.wlan
import huaweisms.api.sms

Upvotes: 1

Related Questions