Skip to main content

An easier way of interacting with the edamam recipe search api.

Project description

edamampy

This project is a library which wraps the Edamam Rest API and provides validation.

Caution

!!! This is the very first version of this package. There is until now only the code in here for the recipe search api. In the future I plan on extending the SDK or maybe just leave it at the one api provided by Edamam. !!! Under active development and breaking changes WILL most likely happen.

Overview

This project was created by me to make interacting with the Edamam Recipe Search Rest API easier. I wanted to build an app which is using Edamams vast DB, but the API was cumbersome to work with. Hence, I developed this little library. It has everything you need to make validated requests to the Recipe Search API provided by Edamam. So that in valid queries don't even reach the API don't hit your API quota and make your life easier. Validation also makes error handling much easier.

Table of Contents

Installation

To install this project, run the following command:

pip install edamampy

Usage

from edamampy import EdamamAPIHandler
from edamampy import ApiSettings

settings = ApiSettings(api_key="your_api_key", app_id="your_app_id", edamam_base_url="current_edamam_base_url")

handler = EdamamAPIHandler(settings)

# will print out paiginated 20 recipes per iteration. Each iteration is one api call.
for recipes in handler:
    print(recipes.model_dump())
    
# incremental
recipes = handler.__next__()
print(recipes.model_dump())

Each for loop iteration is one part of the paiginated api response.

Contribution

If you find anything wrong with the package open up an issue on Github: https://github.com/ma-a-sc/edamampy/issues

License

MIT License

Copyright (c) 2024 Mark Scharmann

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

edamampy-0.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

edamampy-0.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file edamampy-0.1.tar.gz.

File metadata

  • Download URL: edamampy-0.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for edamampy-0.1.tar.gz
Algorithm Hash digest
SHA256 9d4298edab85e8bc854a2415d9cc75338688d345bdae4e99f3375c8fb9d9889d
MD5 49c11061c849122441bf5b4b838d73e5
BLAKE2b-256 debcb423b33fc68934b39717a524fa512b4b179119bb923d10e483d767f1c7ff

See more details on using hashes here.

File details

Details for the file edamampy-0.1-py3-none-any.whl.

File metadata

  • Download URL: edamampy-0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for edamampy-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ace53dfe0ef347e1157f793bdad2ff79861fef1c7f4b36a8cc14f2467b045468
MD5 43c52aa5eca7478c864f4bc5bce2b07d
BLAKE2b-256 da06f56664b0e0b7550220e9baa0efa109a6bc28020bf4fe54fc4f8fc4ea0e5d

See more details on using hashes here.

Supported by

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