Skip to main content

Python client for the Kassal.app API

Project description

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:

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:

from kassalappy import Kassalapp

client = Kassalapp(access_token='your_access_token_here')

You can then use the client to perform various operations, such as:

# 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:

# 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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kassalappy-1.1.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

kassalappy-1.1.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file kassalappy-1.1.1.tar.gz.

File metadata

  • Download URL: kassalappy-1.1.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.7

File hashes

Hashes for kassalappy-1.1.1.tar.gz
Algorithm Hash digest
SHA256 e1b5a3deb77a6c1ae0de7f614ae6e6f01db66d590d82ea66280905f82caed95b
MD5 d84439e01cd689ecae0d72fad9f262bd
BLAKE2b-256 7503e152e6fcbba3361bbf4354ced70f95d739c7b68c3423beb302e94371a062

See more details on using hashes here.

File details

Details for the file kassalappy-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: kassalappy-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.7

File hashes

Hashes for kassalappy-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f633a9aea908703e456afddb959e1d1faf1bfee04f1aed4d55a7e30a693f845f
MD5 8f9812a0c1956cf6a80fef9a23577b02
BLAKE2b-256 c66c1d09683e9352b7010ac4dd3e6de844f85df9989e7f1f87b17963a2e4d27e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page