--- /dev/null
+from .elements import create_fire, create_water # noqa: F401
+
+__version__ = "1.0.0"
+__author__ = "Master Pythonicus"
--- /dev/null
+def create_fire():
+ return "Fire element created"
+
+
+def create_water():
+ return "Water element created"
+
+
+def create_earth():
+ return "Earth element created"
+
+
+def create_air():
+ return "Air element created"
--- /dev/null
+from .spellbook import record_spell # noqa: F401
+from .validator import validate_ingredients # noqa: F401
--- /dev/null
+def record_spell(spell_name: str, ingredients: str) -> str:
+ from .validator import validate_ingredients
+
+ validation_result = validate_ingredients(ingredients)
+ if validation_result.endswith(" - VALID"):
+ return f"Spell recorded: {spell_name} ({validation_result})"
+ return f"Spell rejected: {spell_name} ({validation_result})"
--- /dev/null
+def validate_ingredients(ingredients: str) -> str:
+ valid_elements = ["fire", "water", "earth", "air"]
+ if any(element in ingredients.lower() for element in valid_elements):
+ return f"{ingredients} - VALID"
+ return f"{ingredients} - INVALID"
--- /dev/null
+from .elements import create_fire, create_water, create_earth, create_air
+
+
+def healing_potion():
+ fire_result = create_fire()
+ water_result = create_water()
+ return f"Healing potion brewed with {fire_result} and {water_result}"
+
+
+def strength_potion():
+ earth_result = create_earth()
+ fire_result = create_fire()
+ return f"Strength potion brewed with {earth_result} and {fire_result}"
+
+
+def invisibility_potion():
+ air_result = create_air()
+ water_result = create_water()
+ return f"Invisibility potion brewed with {air_result} and {water_result}"
+
+
+def wisdom_potion():
+ all_four_results = (
+ f"{create_fire()}, {create_water()}, "
+ f"{create_earth()} and {create_air()}"
+ )
+ return f"Wisdom potion brewed with all elements: {all_four_results}"
--- /dev/null
+from .basic import lead_to_gold, stone_to_gem # noqa: F401
+from .advanced import philosophers_stone, elixir_of_life # noqa: F401
--- /dev/null
+from .basic import lead_to_gold
+from ..potions import healing_potion
+
+
+def philosophers_stone():
+ lead_to_gold_result = lead_to_gold()
+ healing_potion_result = healing_potion()
+ return (
+ f"Philosopher's stone created using {lead_to_gold_result} and "
+ f"{healing_potion_result}"
+ )
+
+
+def elixir_of_life():
+ return "Elixir of life: eternal youth achieved!"
--- /dev/null
+from alchemy.elements import create_fire, create_earth
+
+
+def lead_to_gold():
+ fire_result = create_fire()
+ return f"Lead transmuted to gold using {fire_result}"
+
+
+def stone_to_gem():
+ earth_result = create_earth()
+ return f"Stone transmuted to gem using {earth_result}"
--- /dev/null
+from alchemy.grimoire import validate_ingredients, record_spell
+
+print("=== Circular Curse Breaking ===\n")
+
+print("Testing ingredient validation:")
+print(f'validate_ingredients("fire air"): {validate_ingredients("fire air")}')
+print(
+ f'validate_ingredients("dragon scales"): '
+ f'{validate_ingredients("dragon scales")}\n'
+)
+
+print("Testing spell recording with validation:")
+print(
+ f'record_spell("Fireball", "fire air"): '
+ f'{record_spell("Fireball", "fire air")}'
+)
+print(
+ f'record_spell("Dark Magic", "shadow"): '
+ f'{record_spell("Dark Magic", "shadow")}\n'
+)
+
+print("Testing late import technique:")
+print(
+ f'record_spell("Lightning", "air"): '
+ f'{record_spell("Lightning", "air")}\n'
+)
+
+print("Circular dependency curse avoided using late imports!")
+print("All spells processed safely!")
--- /dev/null
+print("=== Import Transmutation Mastery ===\n")
+print("Method 1 - Full module import:")
+import alchemy.elements # noqa: E402
+
+print(f"alchemy.elements.create_fire(): {alchemy.elements.create_fire()}\n")
+print("Method 2 - Specific function import:")
+from alchemy.elements import create_water # noqa: E402
+
+print(f"create_water(): {create_water()}\n")
+print("Method 3 - Aliased import:")
+from alchemy.potions import healing_potion as heal # noqa: E402
+
+print(f"heal(): {heal()}\n")
+print("Method 4 - Multiple imports:")
+from alchemy.elements import create_earth, create_fire # noqa: E402
+from alchemy.potions import strength_potion # noqa: E402
+
+print(f"create_earth(): {create_earth()}")
+print(f"create_fire(): {create_fire()}")
+print(f"strength_potion(): {strength_potion()}\n")
+print("All import transmutation methods mastered!")
--- /dev/null
+import alchemy.transmutation.basic
+import alchemy.transmutation.advanced
+import alchemy.transmutation
+
+print("=== Pathway Debate Mastery ===\n")
+
+print("Testing Absolute Imports (from basic.py):")
+print(f"lead_to_gold(): {alchemy.transmutation.basic.lead_to_gold()}")
+print(f"stone_to_gem(): {alchemy.transmutation.basic.stone_to_gem()}\n")
+
+print("Testing Relative Imports (from advanced.py):")
+print(
+ "philosophers_stone(): "
+ f"{alchemy.transmutation.advanced.philosophers_stone()}"
+)
+print(f"elixir_of_life(): {alchemy.transmutation.advanced.elixir_of_life()}\n")
+
+print("Testing Package Access:")
+print(
+ "alchemy.transmutation.lead_to_gold(): "
+ f"{alchemy.transmutation.lead_to_gold()}"
+)
+print(
+ "alchemy.transmutation.philosophers_stone(): "
+ f"{alchemy.transmutation.philosophers_stone()}\n"
+)
+
+print("Both pathways work! Absolute: clear, Relative: concise")
--- /dev/null
+import alchemy
+import alchemy.elements
+
+print("=== Sacred Scroll Mastery ===\n")
+
+print("Testing direct module access:")
+print(f"alchemy.elements.create_fire(): {alchemy.elements.create_fire()}")
+print(f"alchemy.elements.create_water(): {alchemy.elements.create_water()}")
+print(f"alchemy.elements.create_earth(): {alchemy.elements.create_earth()}")
+print(f"alchemy.elements.create_air(): {alchemy.elements.create_air()}")
+print()
+
+print("Testing package-level access (controlled by __init__.py):")
+try:
+ print(f"alchemy.create_fire(): {alchemy.create_fire()}")
+except AttributeError as e:
+ print(f"alchemy.create_fire(): AttributeError - {e}")
+
+try:
+ print(f"alchemy.create_water(): {alchemy.create_water()}")
+except AttributeError as e:
+ print(f"alchemy.create_water(): AttributeError - {e}")
+
+try:
+ print(f"alchemy.create_earth(): {alchemy.create_earth()}")
+except AttributeError:
+ print("alchemy.create_earth(): AttributeError - not exposed")
+
+try:
+ print(f"alchemy.create_air(): {alchemy.create_air()}")
+except AttributeError:
+ print("alchemy.create_air(): AttributeError - not exposed")
+print()
+
+print("Package metadata:")
+print(f"Version: {alchemy.__version__}")
+print(f"Author: {alchemy.__author__}")
--- /dev/null
+[tool.black]
+line-length = 79