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 details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file harry_potter-0.2.0.tar.gz.

File metadata

  • Download URL: harry_potter-0.2.0.tar.gz
  • Upload date:
  • Size: 47.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.2

File hashes

Hashes for harry_potter-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4b594b209ab10258550fea55f17051b9c80775d735b42ff3b60c68f31eb9868a
MD5 8c693e6067f522d7be9ae8898cfe222b
BLAKE2b-256 ae3c8cf6f14498d08607c84c0c7f28c86d6bfbfa35e1712b062f66c04b27ff1e

See more details on using hashes here.

File details

Details for the file harry_potter-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: harry_potter-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.2

File hashes

Hashes for harry_potter-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38129b37f879159d3adb684e71b8c335bcb476361550a0841cccc7a3275d711b
MD5 7d557a7e39e034804b361a08e63c2a24
BLAKE2b-256 3b2b20feef7f21267573f06c4310db538a631d22720e4a9b022595e5f247aa32

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