A
A
a2020-05-01 13:55:17
Python
a, 2020-05-01 13:55:17

How to import a library?

I installed the library - pip install unitpay-python-sdk.
If you import it, there will be a syntax error:
import unitpay-python-sdk

SyntaxError: invalid syntax

How to fix the error?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Yakushenko, 2020-05-01
@MZOK

from unitpay_python_sdk import UnitPay

api = UnitPay("Private key", debug=settings.DEBUG)

For the future: git/pypi almost always has basic examples of working with the library, including imports.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question