Skip to main content

A fun Python package to predict snack vibes

Project description

Snack Oracle (Komodo Dragons)

log github events

Above badge shows the result of the most recent workflow on the main branch.


About this project

Snack Oracle is a Python package that turns moods, weather, hunger, and late-night energy into snack suggestions and more. It is distributed on PyPI so anyone can install it with pip and import it from their own programs.

PyPI: snackoracle · release 0.1.0


Install and import:

Install from PyPI:

pip install snackoracle==0.1.0

Import the module and call any function. Copy-paste examples for every public function:

from snackoracle import (
    recommend_snack,
    snack_prophecy,
    snack_vibe,
    calorie_denial,
    snack_compatibility,
    midnight_snack_risk,
    snack_aura_reading,
)

print(recommend_snack("happy", 5))
print(snack_prophecy("wednesday", 5))
print(snack_vibe("rainy", "sad"))
print(calorie_denial("chips", 3))
print(snack_compatibility("chips", "dip"))
print(midnight_snack_risk(hours_awake=3, self_control=4))
print(
    snack_aura_reading(
        current_emotion="stressed",
        favorite_flavor="Flamin' Hot Cheetos",
    )
)

Runnable demo: example.py calls each of the functions above (same idea as the block you can paste into a REPL or script).


Contribute: virtualenv, dependencies, test, and build

These steps work on Windows, macOS, and Linux as long as Python 3.10+ is installed.

  1. Clone repository

  2. Install pipenv:

    python -m pip install --user pipenv
    
  3. From the project root, create the virtual environment and install dev dependencies (pytest, build):

    pipenv install --dev
    
  4. Run tests:

    pipenv run pytest
    
  5. Build:

    pipenv run python -m build
    
  6. Run the example (uses every function):

    pipenv run python example.py
    

Configure, run, environment variables, and data

  • Run: There is no long-running server.
  • Environment variables: None required.
  • Database: None. No starter data import.
  • Secrets / .env: This project does not use secret configuration files in the repo.

Team

To install and use the published package (easiest for end-users):

Then, in Python code, import and use it (e.g., from snackoracle import predict_snack_vibe).

To develop/modify the code (for team members contributing):

Clone the repo. Set up the environment: pipenv install (installs dependencies from Pipfile). Run tests: pipenv run pytest or pipenv run python -m pytest. Build locally if needed: pipenv run python -m build. To run the example: pipenv run python example.py.

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

snackoracle-0.1.1.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snackoracle-0.1.1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file snackoracle-0.1.1.tar.gz.

File metadata

  • Download URL: snackoracle-0.1.1.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for snackoracle-0.1.1.tar.gz
Algorithm Hash digest
SHA256 00618b77cc4ea290c37ceee06d588cdb15945c4f467a6bd8a2a0944169855823
MD5 6b8cd6c6432d01c5c21e01e6143f7d68
BLAKE2b-256 0d22bb9a764a0b206c6277a140c852f804a07a872facd30d1de4af92818c1651

See more details on using hashes here.

File details

Details for the file snackoracle-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: snackoracle-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for snackoracle-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae8cbb1059b00934f3b4cf9bd26991e6d3c1bd86c77ddd9de14237e752b7a946
MD5 418f17f9e7a12abb48c90caa2910416d
BLAKE2b-256 ab9fadc0e9c7b188d80db6a22a016b087857eb04cb2ec8c85486a1bdce9c5086

See more details on using hashes here.

Supported by

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