Skip to main content

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"
}

Release files for parse-ingredients 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parse-ingredients 0.0.4
File Size Uploaded
parse-ingredients-0.0.4.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for parse-ingredients 0.0.4
File Interpreter ABI Platform
parse_ingredients-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.8 kB

Release files / parse-ingredients-0.0.4.tar.gz

Download URL parse-ingredients-0.0.4.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
abfa7cfb510e104a75c26da005aa1bc24f5b530eb8a7c52008411ebd5eaa2c2b
BLAKE2b-256 checksum
How to use checksums
6b9bd9b3f7dd669cb876f613a36fae7667a189a5758056985d1388ba74417bd9
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / parse_ingredients-0.0.4-py3-none-any.whl

Download URL parse_ingredients-0.0.4-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
087a81c1d2d9c13272dc239c58e9dc36156f083495db8344d61d4483b5fad89a
BLAKE2b-256 checksum
How to use checksums
5184d7b7a0960964e1e4f06cae8c136974c042e06bcced0f5794ff44941abac2
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page