{"id":49577601,"url":"https://github.com/shadikhasan/pynumbertheory","last_synced_at":"2026-05-03T17:37:29.062Z","repository":{"id":325916932,"uuid":"1102937670","full_name":"shadikhasan/pynumbertheory","owner":"shadikhasan","description":"A lightweight Python library providing number theory utilities including GCD, LCM, primes, modular arithmetic, and the Chinese Remainder Theorem.","archived":false,"fork":false,"pushed_at":"2025-11-24T08:47:28.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-26T15:34:37.068Z","etag":null,"topics":["algorithms","math-library","mathematics","modular-arithmetic","number-theory","primes"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pynumbertheory/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shadikhasan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-24T08:26:07.000Z","updated_at":"2025-11-24T08:54:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shadikhasan/pynumbertheory","commit_stats":null,"previous_names":["shadikhasan/pynumbertheory","shadikhasan/py-numbertheory"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shadikhasan/pynumbertheory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadikhasan%2Fpynumbertheory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadikhasan%2Fpynumbertheory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadikhasan%2Fpynumbertheory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadikhasan%2Fpynumbertheory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shadikhasan","download_url":"https://codeload.github.com/shadikhasan/pynumbertheory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadikhasan%2Fpynumbertheory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32579079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["algorithms","math-library","mathematics","modular-arithmetic","number-theory","primes"],"created_at":"2026-05-03T17:37:27.671Z","updated_at":"2026-05-03T17:37:29.041Z","avatar_url":"https://github.com/shadikhasan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pynumbertheory\n==============\n\nCompact, classroom-friendly number theory helpers for Python projects and scripts.\n\nFeatures\n--------\n- Basic arithmetic: `gcd`, `lcm`, `extended_gcd`, `is_perfect_square`\n- Primes: `is_prime`, `sieve`, `prime_factors`\n- Modular arithmetic: `mod_pow` (fast exponentiation), `mod_inv`, `chinese_remainder`\n\nInstallation\n------------\nRequires Python 3.9+.\n\n```bash\npip install pynumbertheory\n```\n\nOr from source for development:\n\n```bash\npip install -e .[test]\n```\n\nUsage\n-----\n```python\nfrom pynumbertheory import (\n    gcd, lcm, extended_gcd, is_perfect_square,\n    is_prime, sieve, prime_factors,\n    mod_pow, mod_inv, chinese_remainder,\n)\n\ngcd(12, 18)                      # 6\nis_prime(97)                     # True\nsieve(20)                        # [2, 3, 5, 7, 11, 13, 17, 19]\nprime_factors(60)                # [2, 2, 3, 5]\nmod_pow(2, 10, 1000)             # 24\nmod_inv(3, 11)                   # 4\nchinese_remainder([2, 3, 2], [3, 5, 7])  # 23\n```\n\nTesting\n-------\n```bash\npython -m pytest\n```\n\nLicense\n-------\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadikhasan%2Fpynumbertheory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadikhasan%2Fpynumbertheory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadikhasan%2Fpynumbertheory/lists"}