| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A basic Python Async Client for interacting with the SHKeeper API to manage cryptocurrency invoices.
This library is still under development and is intended for basic usage at the moment.
Note: This library is still in development, and the API may change in future versions.
You can install this package via pip (from source) by cloning the repository:
git clone https://github.com/botsgalaxy/python-shkeeper-api-client.git
cd python-shkeeper-api-client
pip install .Here is a very basic example of how to use the library:
from sh_keeper import SHKeeper, Invoice
# Initialize the SHKeeper client
base_url = "https://api.shkeeper.io/api/v1" # The base URL for SHKeeper API
callback_url = "http://your-callback-url.com" # Where you receive updates about payments
sh_keeper = SHKeeper(base_url=base_url, callback_url=callback_url)
# Fetch available cryptocurrencies
crypto, crypto_list = await sh_keeper.get_crypto_currencies()
print(crypto) # List of cryptocurrency symbols
print(crypto_list) # List of cryptocurrency display names
# Create an invoice
invoice = await sh_keeper.create_invoice(
crypto_name="ETH-USDC",
external_id="order_123",
amount="100",
api_key="your_api_key",
callback_url="http://example.com/callback"
)
# Access invoice details
print(f"Invoice Amount: {invoice.amount}")
print(f"Wallet Address: {invoice.wallet}")The SHKeeper client requires the following configuration:
You can provide the callback_url when initializing the SHKeeper class or pass it directly when creating an invoice.
Fetches the available cryptocurrencies from the SHKeeper API.
Returns: A tuple containing two lists:
Raises: SHKeeperError if the API call fails or returns an error.
Creates an invoice for a specific cryptocurrency in SHKeeper.
Parameters:
Returns: An Invoice object containing the created invoice details.
Raises: SHKeeperError if the API call fails or returns an error.
This project is open for contributions! If you'd like to help improve it, feel free to fork the repository and submit a pull request.
If you encounter any issues, feel free to open an issue on the GitHub repository.
| Back | FazBrowse Home | New Git URL |