speedapi-lib


Namespeedapi-lib JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/furkankoykiran/speedapi_lib
SummaryA Python library for interacting with Speed API and managing Lightning Network invoices
upload_time2024-08-22 15:42:20
maintainerNone
docs_urlNone
authorFurkan Köykıran
requires_python>=3.7
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # speedapi_lib

This is a Python library for interacting with the Speed API and managing Lightning Network invoices.

## Installation

You can install this library from your private GitHub repository:

```bash
pip install speedapi-lib
```

## Usage

```python
from speedapi_lib.speedapi import SpeedAPI

# Initialize the SpeedAPI class with user-provided inputs
api = SpeedAPI(secret_key='your_secret_key', base_url='https://api.tryspeed.com')

# Get balance in SATS
balance = api.get_balance_sats()
print(f"Balance: {balance} SATS")

# Decode and print invoice details
invoice_str = "your_invoice_here"
invoice_info = api.get_invoice_info(invoice_str)
print(invoice_info)

# Pay the invoice if balance is sufficient
if balance >= invoice_info["amount"]:
    payment_response = api.pay_invoice(invoice_str)
    print("Payment successful:", payment_response)
else:
    print("Insufficient balance to pay invoice")

```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/furkankoykiran/speedapi_lib",
    "name": "speedapi-lib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Furkan K\u00f6yk\u0131ran",
    "author_email": "furkankoykiran@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/43/43/9ffecba3d8ba4276ec9e42c45d55a4d37f88a09186ae70c5114a7d1b248d/speedapi_lib-0.1.3.tar.gz",
    "platform": null,
    "description": "# speedapi_lib\r\n\r\nThis is a Python library for interacting with the Speed API and managing Lightning Network invoices.\r\n\r\n## Installation\r\n\r\nYou can install this library from your private GitHub repository:\r\n\r\n```bash\r\npip install speedapi-lib\r\n```\r\n\r\n## Usage\r\n\r\n```python\r\nfrom speedapi_lib.speedapi import SpeedAPI\r\n\r\n# Initialize the SpeedAPI class with user-provided inputs\r\napi = SpeedAPI(secret_key='your_secret_key', base_url='https://api.tryspeed.com')\r\n\r\n# Get balance in SATS\r\nbalance = api.get_balance_sats()\r\nprint(f\"Balance: {balance} SATS\")\r\n\r\n# Decode and print invoice details\r\ninvoice_str = \"your_invoice_here\"\r\ninvoice_info = api.get_invoice_info(invoice_str)\r\nprint(invoice_info)\r\n\r\n# Pay the invoice if balance is sufficient\r\nif balance >= invoice_info[\"amount\"]:\r\n    payment_response = api.pay_invoice(invoice_str)\r\n    print(\"Payment successful:\", payment_response)\r\nelse:\r\n    print(\"Insufficient balance to pay invoice\")\r\n\r\n```\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python library for interacting with Speed API and managing Lightning Network invoices",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/furkankoykiran/speedapi_lib"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "882dd7c95bb3078e1bcf0db59918dc1b0d2ba5d9728fd77aa0c3b3ba4b6010ee",
                "md5": "895cf89bd7922fb169c08e068b56ab04",
                "sha256": "09f0abea5aa88d8af1aa9f9a7ea03471874f335dea9962e778067877e3fecf8f"
            },
            "downloads": -1,
            "filename": "speedapi_lib-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "895cf89bd7922fb169c08e068b56ab04",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4954,
            "upload_time": "2024-08-22T15:42:17",
            "upload_time_iso_8601": "2024-08-22T15:42:17.949663Z",
            "url": "https://files.pythonhosted.org/packages/88/2d/d7c95bb3078e1bcf0db59918dc1b0d2ba5d9728fd77aa0c3b3ba4b6010ee/speedapi_lib-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "43439ffecba3d8ba4276ec9e42c45d55a4d37f88a09186ae70c5114a7d1b248d",
                "md5": "cb49d71b019541a62641db99ad5e2447",
                "sha256": "4486cae9d400f422e144dfc3444bf039252c0772f37df31943c7bd303cb21e42"
            },
            "downloads": -1,
            "filename": "speedapi_lib-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "cb49d71b019541a62641db99ad5e2447",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 2751,
            "upload_time": "2024-08-22T15:42:20",
            "upload_time_iso_8601": "2024-08-22T15:42:20.008483Z",
            "url": "https://files.pythonhosted.org/packages/43/43/9ffecba3d8ba4276ec9e42c45d55a4d37f88a09186ae70c5114a7d1b248d/speedapi_lib-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 15:42:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "furkankoykiran",
    "github_project": "speedapi_lib",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "speedapi-lib"
}
        
Elapsed time: 0.30870s