New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

edamampy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edamampy

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

  • 0.1
  • PyPI
  • Socket score

Maintainers
1

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
  • Usage
  • Contributing
  • License

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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc