# kassalappy: Python Client for Kassal.app API
kassalappy is a Python client library designed to interact with the Kassalapp API, providing a convenient way to access its features programmatically. It also includes a command-line interface (CLI) for easy interaction with the API from the terminal.
## Features
- Asynchronous design using `aiohttp` for non-blocking API calls.
- Pydantic models for data validation and serialization.
- Custom exceptions for handling API errors.
- CLI with commands for health checks, managing shopping lists, searching products, and more.
- Tabulated output for CLI commands for better readability.
## Installation
To install kassalappy, you can use pip:
```bash
pip install kassalappy
```
## Usage
### As a Library
To use kassalappy as a library, you need to create an instance of the `Kassalapp` class with your API access token:
```python
from kassalappy import Kassalapp
client = Kassalapp(access_token='your_access_token_here')
```
You can then use the client to perform various operations, such as:
```python
# Check API health
health_status = await client.healthy()
# Get shopping lists
shopping_lists = await client.get_shopping_lists()
# Search for products
products = await client.product_search(search='milk')
```
### As a CLI
kassalappy also provides a CLI for interacting with the Kassalapp API. Here are some examples of CLI commands:
```bash
# Check API health
kassalappy health --token your_access_token_here
# Get shopping lists
kassalappy shopping-lists --token your_access_token_here
# Search for products
kassalappy product "milk" --token your_access_token_here
```
## Documentation
For more detailed information about the API endpoints and data models, refer to the official Kassalapp API documentation: [Kassal.app API Docs](https://kassal.app/docs/api)
## Contributing
Contributions to kassalappy are welcome! Please follow the standard GitHub flow for submitting pull requests.
## License
kassalappy is released under the MIT License. See the LICENSE file for more details.
---
This README provides a general overview of the kassalappy client. For specific details on the API methods and CLI commands, please refer to the source code and the official API documentation.
Raw data
{
"_id": null,
"home_page": "https://github.com/bendikrb/kassalappy",
"name": "kassalappy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "",
"author": "Bendik R. Brenne",
"author_email": "bendik@konstant.no",
"download_url": "https://files.pythonhosted.org/packages/f2/fe/4258a2e2d24d8abf309cecebfb9b74714ae1ef46ec090d3ff2537df71f74/kassalappy-1.0.9.tar.gz",
"platform": null,
"description": "# kassalappy: Python Client for Kassal.app API\n\nkassalappy is a Python client library designed to interact with the Kassalapp API, providing a convenient way to access its features programmatically. It also includes a command-line interface (CLI) for easy interaction with the API from the terminal.\n\n## Features\n\n- Asynchronous design using `aiohttp` for non-blocking API calls.\n- Pydantic models for data validation and serialization.\n- Custom exceptions for handling API errors.\n- CLI with commands for health checks, managing shopping lists, searching products, and more.\n- Tabulated output for CLI commands for better readability.\n\n## Installation\n\nTo install kassalappy, you can use pip:\n\n```bash\npip install kassalappy\n```\n\n## Usage\n\n### As a Library\n\nTo use kassalappy as a library, you need to create an instance of the `Kassalapp` class with your API access token:\n\n```python\nfrom kassalappy import Kassalapp\n\nclient = Kassalapp(access_token='your_access_token_here')\n```\n\nYou can then use the client to perform various operations, such as:\n\n```python\n# Check API health\nhealth_status = await client.healthy()\n\n# Get shopping lists\nshopping_lists = await client.get_shopping_lists()\n\n# Search for products\nproducts = await client.product_search(search='milk')\n```\n\n### As a CLI\n\nkassalappy also provides a CLI for interacting with the Kassalapp API. Here are some examples of CLI commands:\n\n```bash\n# Check API health\nkassalappy health --token your_access_token_here\n\n# Get shopping lists\nkassalappy shopping-lists --token your_access_token_here\n\n# Search for products\nkassalappy product \"milk\" --token your_access_token_here\n```\n\n## Documentation\n\nFor more detailed information about the API endpoints and data models, refer to the official Kassalapp API documentation: [Kassal.app API Docs](https://kassal.app/docs/api)\n\n## Contributing\n\nContributions to kassalappy are welcome! Please follow the standard GitHub flow for submitting pull requests.\n\n## License\n\nkassalappy is released under the MIT License. See the LICENSE file for more details.\n\n---\n\nThis README provides a general overview of the kassalappy client. For specific details on the API methods and CLI commands, please refer to the source code and the official API documentation.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python client for the Kassal.app API",
"version": "1.0.9",
"project_urls": {
"Homepage": "https://github.com/bendikrb/kassalappy",
"Repository": "https://github.com/bendikrb/kassalappy"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d1038e9fd947046213ebef61a3d550fd37663db6485abfcd2c7f49f0547b1e09",
"md5": "6ebb02df9ef98c10a09d25b17d1048c9",
"sha256": "99b72f04452332ab0e8acc82da71b4c98d51665c60d0ca0ccc59dc6f348cf668"
},
"downloads": -1,
"filename": "kassalappy-1.0.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6ebb02df9ef98c10a09d25b17d1048c9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 11683,
"upload_time": "2024-02-03T00:11:13",
"upload_time_iso_8601": "2024-02-03T00:11:13.589936Z",
"url": "https://files.pythonhosted.org/packages/d1/03/8e9fd947046213ebef61a3d550fd37663db6485abfcd2c7f49f0547b1e09/kassalappy-1.0.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f2fe4258a2e2d24d8abf309cecebfb9b74714ae1ef46ec090d3ff2537df71f74",
"md5": "9a36f467b1f6cf6d0b7bc75f966295f2",
"sha256": "012be90304f24f3a0679437836cb4d84433a4dedd06cd44c26b3164c50563f2a"
},
"downloads": -1,
"filename": "kassalappy-1.0.9.tar.gz",
"has_sig": false,
"md5_digest": "9a36f467b1f6cf6d0b7bc75f966295f2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 10732,
"upload_time": "2024-02-03T00:11:14",
"upload_time_iso_8601": "2024-02-03T00:11:14.631492Z",
"url": "https://files.pythonhosted.org/packages/f2/fe/4258a2e2d24d8abf309cecebfb9b74714ae1ef46ec090d3ff2537df71f74/kassalappy-1.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-03 00:11:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bendikrb",
"github_project": "kassalappy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "kassalappy"
}