{"id":34638621,"url":"https://github.com/generoi/finnish-postal-codes","last_synced_at":"2026-06-13T07:01:45.803Z","repository":{"id":329518319,"uuid":"1117678650","full_name":"generoi/finnish-postal-codes","owner":"generoi","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-05T05:39:56.000Z","size":7338,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-05T07:37:25.645Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/generoi.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-12-16T16:52:11.000Z","updated_at":"2026-06-05T05:39:59.000Z","dependencies_parsed_at":"2026-04-15T07:01:52.285Z","dependency_job_id":null,"html_url":"https://github.com/generoi/finnish-postal-codes","commit_stats":null,"previous_names":["generoi/finnish-postal-codes"],"tags_count":145,"template":false,"template_full_name":null,"purl":"pkg:github/generoi/finnish-postal-codes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Ffinnish-postal-codes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Ffinnish-postal-codes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Ffinnish-postal-codes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Ffinnish-postal-codes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/generoi","download_url":"https://codeload.github.com/generoi/finnish-postal-codes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Ffinnish-postal-codes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34275068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2025-12-24T17:12:25.514Z","updated_at":"2026-06-13T07:01:45.737Z","avatar_url":"https://github.com/generoi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Finnish Postal Codes\n\nA Composer package containing all Finnish postal codes and city names in Finnish, Swedish, and English. Data is sourced from [posti.fi](https://www.posti.fi).\n\n## Installation\n\n```bash\ncomposer require generoi/finnish-postal-codes\n```\n\n## Usage\n\n### Basic Usage\n\n```php\nuse FinnishPostalCodes\\PostalCodes;\nuse FinnishPostalCodes\\Language;\n\n// Create instance with language\n$sv = PostalCodes::sv();\n$city = $sv-\u003egetCity('00900'); // Returns \"HELSINGFORS\"\n\n$fi = PostalCodes::fi();\n$city = $fi-\u003egetCity('00900'); // Returns \"HELSINKI\"\n\n// Get full record\n$record = $fi-\u003egetRecord('00900');\necho $record-\u003epostcode_fi_name; // \"HELSINKI\"\necho $record-\u003emunicipal_name_fi; // \"Helsinki\"\necho $record-\u003ead_area_fi; // \"Helsinki-Uusimaa\"\n\n// Check if postal code exists\nif ($fi-\u003eexists('00900')) {\n    // ...\n}\n\n// Get all postal codes\n$allPostcodes = $fi-\u003egetAllPostcodes();\n\n// Iterate over all records (memory efficient)\nforeach ($fi-\u003egetFull() as $postcode =\u003e $record) {\n    // Process each record\n}\n```\n\n### Direct File Access\n\nIf you need raw arrays, you can require the PHP files directly:\n\n```php\n$fiData = require 'vendor/generoi/finnish-postal-codes/data/php/postcodes-fi.php';\n```\n\n## Data Update\n\nTo update the postal code data, run:\n\n```bash\ncomposer run fetch\n```\n\nOr directly:\n\n```bash\nphp scripts/fetch.php\n```\n\nExit codes:\n- `0` - Success/Updated\n- `1` - Error\n- `2` - No change (already up to date)\n\n## Data Files\n\nThe package includes data in multiple formats:\n\n- **JSON**: `data/json/postcodes-{fi|sv|en|full}.json`\n- **PHP**: `data/php/postcodes-{fi|sv|en|full}.php` (can be required directly)\n\n## License\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneroi%2Ffinnish-postal-codes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeneroi%2Ffinnish-postal-codes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneroi%2Ffinnish-postal-codes/lists"}