# ktechpay-python
Python plugin for [KtechPay](https://pay.ktechhub.com/) View on [pypi.python.org](https://pypi.org/project/ktechpayapi/)
## Installation
```sh
pip install ktechpayapi
```
Instantiate KtechPay
```python
from ktechpayapi.ktechpay import Kteckpay
ktech_secret_key = "kt_test_23cf0"
ktechpay = Kteckpay(ktech_secret_key=ktech_secret_key)
# to use transaction class
print(ktechpay.transaction.list())
# initiate
print(ktechpay.transaction.initialize(
amount=3,
email="info@ktechhub.com"
))
print(ktechpay.transaction.verify(reference="e1b6679c5aad4bd3999953ac78e677a79d28d539085e409ebde1be640ebc27e7"))
```
## Static Use
To start using the KtechPay Python API, you need to start by setting your secret key.
You can set your secret key in your environment by running:
```sh
export KTECH_SECRET_KEY = 'your_secret_secret_key'
```
After exporting the keys, you can use the api like this
```python
from ktechpayapi.transaction import Transaction
# to use transaction class
print(Transaction.list())
# initiate
print(Transaction.initialize(
amount=3,
email="info@ktechhub.com"
))
print(Transaction.verify(reference="e1b6679c5aad4bd3999953ac78e677a79d28d539085e409ebde1be640ebc27e7"))
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ktechhub/ktechpay-python",
"name": "ktechpayapi",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8.0",
"maintainer_email": "",
"keywords": "ktechpay python library",
"author": "KtechHub",
"author_email": "info@ktechhub.com",
"download_url": "",
"platform": null,
"description": "\n# ktechpay-python\nPython plugin for [KtechPay](https://pay.ktechhub.com/) View on [pypi.python.org](https://pypi.org/project/ktechpayapi/)\n\n## Installation\n```sh\npip install ktechpayapi\n```\n\nInstantiate KtechPay\n\n```python\nfrom ktechpayapi.ktechpay import Kteckpay\n\nktech_secret_key = \"kt_test_23cf0\"\n\nktechpay = Kteckpay(ktech_secret_key=ktech_secret_key)\n\n# to use transaction class\nprint(ktechpay.transaction.list())\n\n# initiate\nprint(ktechpay.transaction.initialize(\n amount=3,\n email=\"info@ktechhub.com\"\n))\n\nprint(ktechpay.transaction.verify(reference=\"e1b6679c5aad4bd3999953ac78e677a79d28d539085e409ebde1be640ebc27e7\"))\n```\n\n## Static Use\nTo start using the KtechPay Python API, you need to start by setting your secret key.\n\nYou can set your secret key in your environment by running:\n\n```sh\nexport KTECH_SECRET_KEY = 'your_secret_secret_key'\n```\n\nAfter exporting the keys, you can use the api like this\n```python\nfrom ktechpayapi.transaction import Transaction\n\n# to use transaction class\nprint(Transaction.list())\n\n# initiate\nprint(Transaction.initialize(\n amount=3,\n email=\"info@ktechhub.com\"\n))\n\nprint(Transaction.verify(reference=\"e1b6679c5aad4bd3999953ac78e677a79d28d539085e409ebde1be640ebc27e7\"))\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A python library to consume KtechPay API",
"version": "1.4.0",
"project_urls": {
"Homepage": "https://github.com/ktechhub/ktechpay-python"
},
"split_keywords": [
"ktechpay",
"python",
"library"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "19fcb7482a9034ac35612609b3b239aedb25b0e1a3b2424f4e200f8191080a29",
"md5": "c776397a5fad793358a2bfc45651c20c",
"sha256": "4d0b524ab0d442f0679d5d437565cac67db4142efc3f24dfc913f493caa616eb"
},
"downloads": -1,
"filename": "ktechpayapi-1.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c776397a5fad793358a2bfc45651c20c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.0",
"size": 4632,
"upload_time": "2023-12-09T11:15:44",
"upload_time_iso_8601": "2023-12-09T11:15:44.418114Z",
"url": "https://files.pythonhosted.org/packages/19/fc/b7482a9034ac35612609b3b239aedb25b0e1a3b2424f4e200f8191080a29/ktechpayapi-1.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-09 11:15:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ktechhub",
"github_project": "ktechpay-python",
"github_not_found": true,
"lcname": "ktechpayapi"
}