Update README.md

This commit is contained in:
Jeff Vandrew Jr 2019-01-17 01:02:52 -05:00 committed by GitHub
parent 1aca4680e0
commit 2cdd73658f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,14 +2,14 @@
## Install
```shell
pip3 install btcpay-python
pip3 install btcpay_python
```
## The "easy method" to create a new BTCPay client
* On BTCPay server > shop > access tokens > create new token, copy pairing code.
* Then use that code in the below Python code:
```python
from btcpay-python import BTCPayClient
from btcpay_python import BTCPayClient
client = BTCPayClient.create_client(host='https://btcpay.example.com', code=<pairing-code>)
```
@ -18,12 +18,12 @@ client = BTCPayClient.create_client(host='https://btcpay.example.com', code=<pai
## Creating a client the manual way (not necessary if you used the 'easy' method)
* Generate and save private key:
```python
import btcpay-python.crypto
import btcpay_python.crypto
privkey = btcpay.crypto.generate_privkey()
```
* Create client:
```python
from btcpay-python import BTCPayClient
from btcpay_python import BTCPayClient
client = BTCPayClient(host='http://hostname', pem=privkey)
```
* On BTCPay server > shop > access tokens > create new token, copy pairing code: