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
File details
Details for the file parse-ingredients-0.0.4.tar.gz
.
File metadata
- Download URL: parse-ingredients-0.0.4.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
abfa7cfb510e104a75c26da005aa1bc24f5b530eb8a7c52008411ebd5eaa2c2b
|
|
MD5 |
0b37b6e0932bb095a50cdb90b48a3066
|
|
BLAKE2b-256 |
6b9bd9b3f7dd669cb876f613a36fae7667a189a5758056985d1388ba74417bd9
|
File details
Details for the file parse_ingredients-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: parse_ingredients-0.0.4-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
087a81c1d2d9c13272dc239c58e9dc36156f083495db8344d61d4483b5fad89a
|
|
MD5 |
2e9ad4340c7723a72696d483ea1776e8
|
|
BLAKE2b-256 |
5184d7b7a0960964e1e4f06cae8c136974c042e06bcced0f5794ff44941abac2
|