{"id":27816,"library":"ghmap","title":"ghmap","description":"A GitHub event mapping and analysis tool that processes GitHub Events API data to generate human-readable summaries. Version 2.0.4, actively maintained with monthly releases.","status":"active","version":"2.0.4","language":"python","source_language":"en","source_url":"https://github.com/uhourri/ghmap","tags":["github","events","mapping","api","cli"],"install":[{"cmd":"pip install ghmap","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required Python version","package":"python>=3.10","optional":false},{"reason":"HTTP requests to GitHub API","package":"requests","optional":false}],"imports":[{"note":"GHMap is a class in the main ghmap module, not a submodule","wrong":"import ghmap.GHMap","symbol":"GHMap","correct":"from ghmap import GHMap"},{"note":"process_events is exported at the package level, not in a submodule","wrong":"from ghmap.events import process_events","symbol":"process_events","correct":"from ghmap import process_events"}],"quickstart":{"code":"from ghmap import GHMap\nimport os\n\n# Initialize with token from environment\nghmap = GHMap(token=os.environ.get('GITHUB_TOKEN', ''))\n\n# Process events for a repository\nevents = ghmap.get_repo_events('owner/repo')\nsummary = ghmap.map_events(events)\nprint(summary)","lang":"python","description":"Quickstart showing how to initialize GHMap with a GitHub token and map events from a repository."},"warnings":[{"fix":"Provide a valid GITHUB_TOKEN via environment variable or constructor argument.","message":"In v2.0.0, the `get_repo_events` method now requires a token; previously it worked without authentication for public repos.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Replace `--output-format json` with `--format json`.","message":"The `--output-format` CLI argument was deprecated in v1.0.6 and removed in v2.0.0. Use `--format` instead.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Check return value with `if summary is not None:` or use `or` to provide a default.","message":"The `map_events` method returns `None` if no events are found, not an empty list.","severity":"gotcha","affected_versions":"All"},{"fix":"Use raw strings or forward slashes in config paths, or upgrade to >=2.0.1.","message":"On Windows, paths containing backslashes cause parsing errors in the config files. Fixed in v2.0.1 but if you use custom config paths, use forward slashes or raw strings.","severity":"gotcha","affected_versions":">=2.0.0,<2.0.1"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install ghmap` in your active environment.","cause":"ghmap is not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'ghmap'"},{"fix":"Use `from ghmap import GHMap`.","cause":"Trying to import GHMap from the wrong submodule or using an outdated import path.","error":"ImportError: cannot import name 'GHMap' from 'ghmap'"},{"fix":"Check if the result is None before iterating: `if summary:` then process.","cause":"map_events returned None (no events found) and you tried to iterate over it.","error":"TypeError: 'NoneType' object is not iterable"},{"fix":"Set GITHUB_TOKEN environment variable or pass token parameter to GHMap constructor.","cause":"GitHub token is missing or invalid, required since v2.0.0.","error":"requests.exceptions.HTTPError: 401 Client Error: Unauthorized"},{"fix":"Use `--format json` instead.","cause":"Using deprecated `--output-format` flag with removed value 'json'.","error":"ValueError: Invalid format 'json'. Valid formats are: 'text', 'csv'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}