Skip to main content

A python package that allows users to create their own wizard.

Project description

Create your own Wizard

Samuel's Badge

Authors

Project Overview

Our project is Harry Potter-based and is split into five different functions:

  1. Wizard Name Generator

    • This function takes a theme like "American" or "bizarre" and utilizes OpenAI to create a wizard name.
  2. Choose a Harry Potter Themed Animal

    • It takes in a house, and based on that house, it prompts the user with a set of questions and returns an animal.
  3. Choose Hogwarts House

    • It takes your house preference like the sorting hat would.
  4. Choose a Harry Potter-themed Candy

    • Takes the number of candies and chooses them randomly from a pre-defined list.
  5. Generate a Harry Potter Fighting Spell

    • It takes the number of spells to be generated, utilizes Latin prefixes and suffixes, and randomly mixes them to create a fighting spell. The spells are returned in a 2D array where the inner array has four elements: the Latin prefix and suffix, and the English translation.

Usage and installation

  1. Create a pipenv-managed virtual environment and install the latest version of the package installed: pipenv install -i https://test.pypi.org/simple/ harry-potter==0.0.3. (Note that if you've previously created a pipenv virtual environment in the same directory, you may have to delete the old one first. Find out where it is located with the pipenv --venv command.)
  2. Activate the virtual environment: pipenv shell.
  3. Run pip install openai
  4. Run pip install python-dotenv
  5. Run OPENAI_API_KEY=[Your API key]
  6. Create a Python program file that imports your package and uses it: from harry_potter.create_wizard import CreateWizard
  7. Create an instance of a wizard: wizard = CreateWizard()
  8. Print the functions: e.g. print(wizard.wizardNameGenerator("american"))
  9. Exit the virtual environment: exit.

Contribute

  • Clone the repository
git clone https://github.com/software-students-fall2023/3-python-package-exercise-loki.git
  • Install the virtual environment
python3 -m venv .venv
source .venv/bin/activate
  • Install the requierments
pip3 install -r requirements.txt
  • Install pyton-dotenv
pip install python-dotenv

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

harry_potter-0.2.0.tar.gz (47.2 kB view hashes)

Uploaded Source

Built Distribution

harry_potter-0.2.0-py3-none-any.whl (33.7 kB view hashes)

Uploaded Python 3

Supported by

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