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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b594b209ab10258550fea55f17051b9c80775d735b42ff3b60c68f31eb9868a
|
|
| MD5 |
8c693e6067f522d7be9ae8898cfe222b
|
|
| BLAKE2b-256 |
ae3c8cf6f14498d08607c84c0c7f28c86d6bfbfa35e1712b062f66c04b27ff1e
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38129b37f879159d3adb684e71b8c335bcb476361550a0841cccc7a3275d711b
|
|
| MD5 |
7d557a7e39e034804b361a08e63c2a24
|
|
| BLAKE2b-256 |
3b2b20feef7f21267573f06c4310db538a631d22720e4a9b022595e5f247aa32
|