WizardAPI is a magical Python framework that lets developers cast spells as if they were powerful wizards. Whether you want to throw fireballs at bugs or summon dragons to help with debugging β WizardAPI has you covered.
Because coding is already magic. Let's make it official.
- π₯
fireball(target)β Deal damage to your enemies. - π
summon_familiar(type)β Summon your magical companion. - π‘οΈ
shield(strength)β Protect your code from crashes. - π΅οΈ
invisibility(duration)β Hide from stack traces. - π§ͺ Create your own spells with
@spelldecorator. - πͺ Designed to be fun, educational, and Sphinx-demo friendly.
pip install wizardapiOr, from source:
git clone https://github.com/elena-soloveva/wizardapi.git
cd wizardapi
python setup.py installRequires:
- Python 3.8+
- Mana β₯ 50 MP
from wizardapi import SpellCaster
caster = SpellCaster(api_key="your-secret-scroll")
caster.cast("fireball", target="bug")Output:
π₯ You cast Fireball on Bug!
Bug takes 42 fire damage.
Full documentation is available at: π https://elena-soloveva.github.io/wizardapi/
Built with Sphinx using Markdown and MyST Parser.
You can write your own spells with the @spell decorator:
from wizardapi import spell
@spell(name="rain_of_cats")
def rain_of_cats(target):
return f"β It's raining cats on {target}!"Register the spell:
caster.register_custom_spell(rain_of_cats)
caster.cast("rain_of_cats", target="orc")Pull requests are welcome β especially if you're a level 5+ mage. See CONTRIBUTING.md for guidance.
This project is licensed under the MIT License. No actual mana or spell components required.