A python package that allows users to create their own wizard.
Project description
Create your own Wizard
Authors
- Lemon - Lemon's GitHub
- Ana Sofia - Ana Sofia's GitHub
- Samuel - Samuel's GitHub
Project Overview
Our project is Harry Potter-based and is split into five different functions:
-
Wizard Name Generator
- This function takes a theme like "American" or "bizarre" and utilizes OpenAI to create a wizard name.
-
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.
-
Choose Hogwarts House
- It takes your house preference like the sorting hat would.
-
Choose a Harry Potter-themed Candy
- Takes the number of candies and chooses them randomly from a pre-defined list.
-
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
- 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.)
- Activate the virtual environment: pipenv shell.
- Run pip install openai
- Run pip install python-dotenv
- Run OPENAI_API_KEY=[Your API key]
- Create a Python program file that imports your package and uses it: from harry_potter.create_wizard import CreateWizard
- Create an instance of a wizard: wizard = CreateWizard()
- Print the functions: e.g. print(wizard.wizardNameGenerator("american"))
- 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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for harry_potter-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38129b37f879159d3adb684e71b8c335bcb476361550a0841cccc7a3275d711b |
|
MD5 | 7d557a7e39e034804b361a08e63c2a24 |
|
BLAKE2b-256 | 3b2b20feef7f21267573f06c4310db538a631d22720e4a9b022595e5f247aa32 |