Skip to main content

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

parse-ingredients-0.0.4.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

parse_ingredients-0.0.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

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

Hashes for parse-ingredients-0.0.4.tar.gz
Algorithm Hash digest
SHA256 abfa7cfb510e104a75c26da005aa1bc24f5b530eb8a7c52008411ebd5eaa2c2b
MD5 0b37b6e0932bb095a50cdb90b48a3066
BLAKE2b-256 6b9bd9b3f7dd669cb876f613a36fae7667a189a5758056985d1388ba74417bd9

See more details on using hashes here.

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

Hashes for parse_ingredients-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 087a81c1d2d9c13272dc239c58e9dc36156f083495db8344d61d4483b5fad89a
MD5 2e9ad4340c7723a72696d483ea1776e8
BLAKE2b-256 5184d7b7a0960964e1e4f06cae8c136974c042e06bcced0f5794ff44941abac2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page