Parse strings of ingredients to their name, unit, quantity and optional comments.
Project description
parse-ingredients
Parse strings of ingredients to their name, unit, quantity and optional comments.
To install
pip install parse-ingredients
To use
from parse_ingredients import parse_ingredient
result = parse_ingredient("12 ounces lean ground beef, preferably 85 percent lean")
print(f"Found results: \n {result}")
parse_ingredient()
returns an object in the form of:
{
"name": "lean ground beef",
"quantity": 12,
"unit": "oz",
"comment": "preferably 85 percent lean",
"original_string": "12 ounces lean ground beef, preferably 85 percent lean"
}
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
Built Distribution
Close
Hashes for parse_ingredients-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 087a81c1d2d9c13272dc239c58e9dc36156f083495db8344d61d4483b5fad89a |
|
MD5 | 2e9ad4340c7723a72696d483ea1776e8 |
|
BLAKE2b-256 | 5184d7b7a0960964e1e4f06cae8c136974c042e06bcced0f5794ff44941abac2 |