{"id":38957072,"url":"https://github.com/tolstislon/phone-gen","last_synced_at":"2026-01-17T16:18:46.932Z","repository":{"id":37939444,"uuid":"264785108","full_name":"tolstislon/phone-gen","owner":"tolstislon","description":"International phone number generation","archived":false,"fork":false,"pushed_at":"2026-01-16T11:50:40.000Z","size":339,"stargazers_count":21,"open_issues_count":1,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-17T01:17:01.160Z","etag":null,"topics":["phone","phone-number","test-data","test-data-generator","testing"],"latest_commit_sha":null,"homepage":"","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/tolstislon.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-05-18T00:36:26.000Z","updated_at":"2026-01-16T11:50:43.000Z","dependencies_parsed_at":"2026-01-16T15:18:21.434Z","dependency_job_id":null,"html_url":"https://github.com/tolstislon/phone-gen","commit_stats":{"total_commits":77,"total_committers":2,"mean_commits":38.5,"dds":"0.051948051948051965","last_synced_commit":"f2818065bc07215618f75e82576e446f4ea49c52"},"previous_names":[],"tags_count":127,"template":false,"template_full_name":null,"purl":"pkg:github/tolstislon/phone-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolstislon%2Fphone-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolstislon%2Fphone-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolstislon%2Fphone-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolstislon%2Fphone-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tolstislon","download_url":"https://codeload.github.com/tolstislon/phone-gen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolstislon%2Fphone-gen/sbom","scorecard":{"id":891715,"data":{"date":"2025-08-11","repo":{"name":"github.com/tolstislon/phone-gen","commit":"81165abcf2aa6caba6981487a15e8a3811617516"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-package.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/python-publish.yml:16","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/tolstislon/phone-gen/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/tolstislon/phone-gen/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/tolstislon/phone-gen/python-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/tolstislon/phone-gen/python-publish.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:31","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:32","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/python-publish.yml:19"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T12:05:58.811Z","repository_id":37939444,"created_at":"2025-08-24T12:05:58.811Z","updated_at":"2025-08-24T12:05:58.811Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"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":["phone","phone-number","test-data","test-data-generator","testing"],"created_at":"2026-01-17T16:18:46.854Z","updated_at":"2026-01-17T16:18:46.924Z","avatar_url":"https://github.com/tolstislon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phone Gen\n\n[![PyPI](https://img.shields.io/pypi/v/phone-gen?color=%2301a001\u0026label=pypi\u0026logo=version)](https://pypi.org/project/phone-gen/)\n[![Downloads](https://pepy.tech/badge/phone-gen)](https://pepy.tech/project/phone-gen)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/phone-gen.svg)](https://pypi.org/project/phone-gen/)\n[![PyPI - Implementation](https://img.shields.io/pypi/implementation/phone-gen)](https://github.com/tolstislon/phone-gen)  \n\n[![Tests status](https://github.com/tolstislon/phone-gen/workflows/tests/badge.svg)](https://github.com/tolstislon/phone-gen/actions/workflows/python-package.yml)\n\nInternational phone number generation\n\n**This module was created exclusively for generating test data**\n\n\nInstallation\n----\nInstall using pip with\n\n```bash\npip install phone-gen\n```\n\nExample\n----\n\n```python\nfrom phone_gen import PhoneNumber\n\nphone_number = PhoneNumber(\"GB\")  # ISO 3166-2\n# or\nphone_number = PhoneNumber(\"GBR\")  # ISO 3166-3\n# or\nphone_number = PhoneNumber(\"Great Britain\")  # Country name\n\n# Get a phone number\nnumber = phone_number.get_number()\nprint(number)  # +442908124840\n\n# Get a country code\ncountry_code = phone_number.get_code()\nprint(country_code)  # 44\n\n# Get a phone number without a country code\nnumber = phone_number.get_number(full=False)\nprint(number)  # 183782623\n\n# Get a mobile phone number\nnumber = phone_number.get_mobile()\nprint(number)  # +447911899521\n\n# Get a national phone number\nnumber = phone_number.get_national()\nprint(number)  # +442408055065\n```\n\n##### pytest fixture\n\n```python\nimport pytest\nfrom phone_gen import PhoneNumber\n\n\n@pytest.fixture\ndef phone_number():\n    def wrap(code):\n        return PhoneNumber(code).get_number()\n\n    yield wrap\n\n\ndef test_one(phone_number):\n    number = phone_number(\"DE\")\n    ...\n```\n\nUsing the CLI\n----\n\n```bash\nusage: phone-gen [-h] [-v] [-n] country [country ...]\n\nInternational phone number generation\n\npositional arguments:\n  country         Country code or country name. Example: \"GB\" or \"GBR\" or \"Great Britain\"\n\noptional arguments:\n  -h, --help      show this help message and exit\n  -v, --version   show program's version number and exit\n  -f, --not-full  Get a phone number without a country code\n  -m, --mobile    Get mobile phone number\n  -n, --national  Get national phone number\n```\n\nExample\n\n```bash\n# Get a phone number\n\n$ phone-gen DE\n+49791774007056\n\n$ phone-gen DEU\n+499968635\n\n$ phone-gen Germany\n+49960335800\n\n\n# Get a phone number without a country code\n$ phone-gen -f DE\n66999511\n\n$ phone-gen -f Germany\n877595\n\n# Get mobile phone number\n$ phone-gen -m DE\n+491601376066\n\n# Get national phone number\n$ phone-gen -n DE\n+4940381\n```\n\nResources\n----\n\n* [Google's libphonenumber](https://github.com/google/libphonenumber)\n\nChangelog\n----\n\n* [Releases](https://github.com/tolstislon/phone-gen/releases)\n\nContributing\n----\n\n#### Contributions are very welcome.\n\nYou might want to:\n\n* Fix spelling errors\n* Improve documentation\n* Add tests for untested code\n* Add new features\n* Fix bugs\n\n#### Getting started\n\n* python 3.12\n* pipenv 2023.11.15+\n\n1. Clone the repository\n    ```bash\n    git clone https://github.com/tolstislon/phone-gen.git\n    cd phone-gen\n   ```\n2. Install dev dependencies\n    ```bash\n    pipenv install --dev\n    pipenv shell\n   ```\n3. Run ruff format\n    ```bash\n    pipenv run format\n   ```\n4. Run ruff check\n    ```bash\n    pipenv run check\n   ```\n5. Run the tests\n    ```bash\n    pipenv run tests\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolstislon%2Fphone-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftolstislon%2Fphone-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolstislon%2Fphone-gen/lists"}