# 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": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Bendik R. Brenne",
"author_email": "bendik@konstant.no",
"download_url": "https://files.pythonhosted.org/packages/75/03/e152e6fcbba3361bbf4354ced70f95d739c7b68c3423beb302e94371a062/kassalappy-1.1.1.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\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python client for the Kassal.app API",
"version": "1.1.1",
"project_urls": {
"Homepage": "https://github.com/bendikrb/kassalappy",
"Repository": "https://github.com/bendikrb/kassalappy"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c66c1d09683e9352b7010ac4dd3e6de844f85df9989e7f1f87b17963a2e4d27e",
"md5": "8f9812a0c1956cf6a80fef9a23577b02",
"sha256": "f633a9aea908703e456afddb959e1d1faf1bfee04f1aed4d55a7e30a693f845f"
},
"downloads": -1,
"filename": "kassalappy-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8f9812a0c1956cf6a80fef9a23577b02",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 11701,
"upload_time": "2024-10-31T04:22:27",
"upload_time_iso_8601": "2024-10-31T04:22:27.509752Z",
"url": "https://files.pythonhosted.org/packages/c6/6c/1d09683e9352b7010ac4dd3e6de844f85df9989e7f1f87b17963a2e4d27e/kassalappy-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7503e152e6fcbba3361bbf4354ced70f95d739c7b68c3423beb302e94371a062",
"md5": "d84439e01cd689ecae0d72fad9f262bd",
"sha256": "e1b5a3deb77a6c1ae0de7f614ae6e6f01db66d590d82ea66280905f82caed95b"
},
"downloads": -1,
"filename": "kassalappy-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "d84439e01cd689ecae0d72fad9f262bd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 10757,
"upload_time": "2024-10-31T04:22:29",
"upload_time_iso_8601": "2024-10-31T04:22:29.055824Z",
"url": "https://files.pythonhosted.org/packages/75/03/e152e6fcbba3361bbf4354ced70f95d739c7b68c3423beb302e94371a062/kassalappy-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-31 04:22:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bendikrb",
"github_project": "kassalappy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "kassalappy"
}