Image generated by ChatGPT based on post content

Sharp Cooking - How to upgrade Python Azure Functions from v1 to v2

For a while, I’ve been using Python Azure Functions to power the Sharp Cooking Backend API. When I first created the API, the v2 programming model was still in preview and not fully ready. Now that it’s generally available, I finally upgraded. The v2 model reduces boilerplate code and adds features that weren’t previously possible—such as streaming responses, which is great for LLM models. Here’s a quick overview of the process and what changed....

September 10, 2024 · 3 min · LPains
Sharp Cooking Release Announcement

Sharp Cooking v1.11.0 released!

I’m excited to announce the release of Sharp Cooking v1.11.0! This update brings several new features and improvements to enhance your cooking experience. 1. Set Recipe Language One of the new features allows you to set the language for individual recipes. For example, when my mom sends me one of her amazing recipes in Portuguese, I can now set the recipe language accordingly. This way, I can still use Sharp Cooking’s highlighting and parsing features effectively, even if the recipe is not in the same language as the app....

May 31, 2024 · 2 min · LPains
Nutrition Label

Sharp Cooking now displays nutrition labels

Sharp Cooking has reached its fourth anniversary! To mark this significant milestone, we’re thrilled to introduce a highly anticipated feature: Nutrition Labels. Now, not only can you input nutrition values manually, but recipes imported from websites supporting nutrition values will also display them in the recipe view. To generate these labels, we first need to gather the nutritional data for each recipe. Fortunately, many websites offer this information, and recipe-scrapers, the python package utilized by Sharp Cooking to extract recipes from the web, already supports it too....

March 26, 2024 · 2 min · LPains
JavaScript code

Converting sharp-recipe-parser from typescript to javascript + jsdoc

Introduction I should start by saying that I am a big proponent of TypeScript. I have been using it since version 1.5 back in 2015. Coming from a backend background with typed languages, not having types in JavaScript was an interesting experience for me. As a developer, the two aspects of typed languages that help me the most are intellisense and the compiler. Intellisense helps me write code faster, and the compiler helps me catch errors before runtime....

January 1, 2024 · 6 min · LPains
Self destruct

Self destructing data with Cosmos DB

I am working on a share feature for Sharp Cooking that will allow users to share recipes online. This is the first time a feature will require storing data outside of the local app context, and Cosmos DB is a great option for implementing it. First, it provides a free tier that should be sufficient for my users. Second, Sharp Cooking already stores recipes as documents in the browser, so it should be easy to send the same data to Cosmos DB....

August 25, 2023 · 2 min · LPains