{"id":29688537,"url":"https://github.com/davidbuchanan314/magic-numbers","last_synced_at":"2025-07-23T05:06:53.605Z","repository":{"id":266869280,"uuid":"899601792","full_name":"DavidBuchanan314/magic-numbers","owner":"DavidBuchanan314","description":"magically import magic number constants ","archived":false,"fork":false,"pushed_at":"2024-12-14T20:59:49.000Z","size":18,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-21T18:28:32.591Z","etag":null,"topics":["magic","magic-numbers","python-imports","python3","terrible-hack"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/magic-numbers/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavidBuchanan314.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-06T15:54:23.000Z","updated_at":"2025-02-03T05:52:02.000Z","dependencies_parsed_at":"2024-12-06T17:22:33.501Z","dependency_job_id":"a7d6cb13-d96b-4cd2-917d-e823390ee3dc","html_url":"https://github.com/DavidBuchanan314/magic-numbers","commit_stats":null,"previous_names":["davidbuchanan314/magic-numbers"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/DavidBuchanan314/magic-numbers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Fmagic-numbers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Fmagic-numbers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Fmagic-numbers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Fmagic-numbers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidBuchanan314","download_url":"https://codeload.github.com/DavidBuchanan314/magic-numbers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidBuchanan314%2Fmagic-numbers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266620084,"owners_count":23957309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["magic","magic-numbers","python-imports","python3","terrible-hack"],"created_at":"2025-07-23T05:06:53.019Z","updated_at":"2025-07-23T05:06:53.580Z","avatar_url":"https://github.com/DavidBuchanan314.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# magic-numbers\n\nMagically import magic number constants. Like so:\n\n```py\nfrom magic_numbers import FORTY_TWO, SIXTY_NINE, FOUR_HUNDRED_AND_TWENTY\nfrom magic_numbers import ONE_THOUSAND_THREE_HUNDRED_AND_TWELVE\nfrom magic_numbers import THREE_POINT_ONE_FOUR_ONE_FIVE_NINE_TWO as PI\nfrom magic_numbers import NEGATIVE_SIX_HUNDRED_AND_SIXTY_SIX\nfrom magic_numbers import MINUS_ZERO_POINT_ONE\n\nprint(f\"{FORTY_TWO = }\")  # 42\nprint(f\"{SIXTY_NINE = }\")  # 69\nprint(f\"{FOUR_HUNDRED_AND_TWENTY = }\")  # 420\nprint(f\"{ONE_THOUSAND_THREE_HUNDRED_AND_TWELVE = }\")  # 1312\nprint(f\"{PI = }\")  # 3.141592\nprint(f\"{NEGATIVE_SIX_HUNDRED_AND_SIXTY_SIX = }\")  # -666\nprint(f\"{MINUS_ZERO_POINT_ONE = }\")  # -0.1\n```\n\nNote: Floats can only be specified using \"point\", there is no support (yet) for fractions like `THREE_AND_A_HALF` or `TWO_THIRDS`\n\n## Installation\n\n```sh\npython3 -m pip install magic-numbers\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbuchanan314%2Fmagic-numbers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidbuchanan314%2Fmagic-numbers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbuchanan314%2Fmagic-numbers/lists"}