{"id":27245,"library":"prefigure","title":"prefigure","description":"Run configuration management utilities combining configparser, argparse, and wandb.API. Version 0.0.10 is the latest; release cadence is sporadic.","status":"active","version":"0.0.10","language":"python","source_language":"en","source_url":"https://github.com/drscotthawley/prefigure","tags":["configuration","argparse","configparser","wandb"],"install":[{"cmd":"pip install prefigure","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Optional integration for Weights & Biases logging","package":"wandb","optional":true}],"imports":[{"note":"Correct import is direct from module","wrong":"import prefigure; c = prefigure.Config()","symbol":"Config","correct":"from prefigure import Config"},{"note":"Module is small; simple import works","wrong":null,"symbol":"prefigure","correct":"import prefigure"}],"quickstart":{"code":"from prefigure import Config\nimport os\n\n# Define configuration\ncfg = Config(\n    defaults={\n        'learning_rate': 1e-3,\n        'batch_size': 32,\n    },\n    wandb_api_key=os.environ.get('WANDB_API_KEY', '')\n)\n\n# Parse command line arguments\ncfg.parse()\nprint(cfg.learning_rate)","lang":"python","description":"Create a Config object with defaults, then parse arguments."},"warnings":[{"fix":"Call cfg.parse() after setting defaults explicitly.","message":"The 'parse' method may overwrite defaults with command-line args; be careful about order of operations.","severity":"gotcha","affected_versions":"all"},{"fix":"Install wandb if you need logging: pip install wandb","message":"If wandb is not installed, the wandb integration fails silently; no error is raised.","severity":"gotcha","affected_versions":"all"},{"fix":"Set WANDB_API_KEY env var instead of passing it to Config.","message":"The 'wandb_api_key' parameter is deprecated in favor of environment variable WANDB_API_KEY.","severity":"deprecated","affected_versions":"0.0.10"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Upgrade to >=0.0.8: pip install --upgrade prefigure or use Config.parse() only in newer versions.","cause":"Using version < 0.0.8 where parse was called differently.","error":"AttributeError: 'Config' object has no attribute 'parse'"},{"fix":"Install wandb: pip install wandb or disable wandb usage in config.","cause":"wandb not installed but code tries to use wandb features.","error":"ModuleNotFoundError: No module named 'wandb'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}