{"id":18365379,"url":"https://github.com/le0pard/postal_server","last_synced_at":"2025-04-06T16:31:22.582Z","repository":{"id":246983108,"uuid":"824762664","full_name":"le0pard/postal_server","owner":"le0pard","description":"Postal web server offers advanced capabilities for parsing and standardizing street addresses","archived":false,"fork":false,"pushed_at":"2025-02-16T14:47:02.000Z","size":8831,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T03:23:36.656Z","etag":null,"topics":["address","libpostal","normalization","parsing"],"latest_commit_sha":null,"homepage":"","language":"Go","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/le0pard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":["https://www.buymeacoffee.com/leopard"]}},"created_at":"2024-07-05T22:15:54.000Z","updated_at":"2025-02-16T14:46:52.000Z","dependencies_parsed_at":"2024-07-06T02:54:44.425Z","dependency_job_id":"303067bb-2b7e-46a4-9160-044b245b8c98","html_url":"https://github.com/le0pard/postal_server","commit_stats":null,"previous_names":["le0pard/postal_server"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/le0pard%2Fpostal_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/le0pard%2Fpostal_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/le0pard%2Fpostal_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/le0pard%2Fpostal_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/le0pard","download_url":"https://codeload.github.com/le0pard/postal_server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247512604,"owners_count":20950888,"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","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":["address","libpostal","normalization","parsing"],"created_at":"2024-11-05T23:13:18.364Z","updated_at":"2025-04-06T16:31:22.337Z","avatar_url":"https://github.com/le0pard.png","language":"Go","readme":"# Postal web server\n\nThis Docker image provides a web server that grants access to the [libpostal](https://github.com/openvenues/libpostal) library, enabling the parsing and normalization of street addresses globally.\n\n[Ready docker image](https://github.com/le0pard/postal_server/pkgs/container/postal_server)\n\n```bash\ndocker pull ghcr.io/le0pard/postal_server:latest\n```\n\n## Usage\n\nTo expand address strings into normalized forms suitable for geocoder queries, use the `/expand` endpoint with the `address` query parameter. For example, to expand the address \"Quatre-vingt-douze Ave des Ave des Champs-Élysées\":\n\n```bash\nGET /expand?address=Quatre-vingt-douze%20Ave%20des%20Ave%20des%20Champs-Élysées\n\n[\n  \"92 avenue des avenue des champs-elysees\",\n  \"92 avenue des avenue des champs elysees\",\n  \"92 avenue des avenue des champselysees\"\n]\n```\n\nThis will provide the expanded and normalized addresses ready for geocoding queries.\n\nTo parse addresses into components, use the `/parse` endpoint with the `address` query parameter. For example, to parse the address \"781 Franklin Ave Crown Heights Brooklyn NY 11216 USA\":\n\n```bash\nGET /parse?address=781%20Franklin%20Ave%20Crown%20Heights%20Brooklyn%20NY%2011216%20USA\n\n[\n  {\n    \"label\": \"house_number\",\n    \"value\": \"781\"\n  },\n  {\n    \"label\": \"road\",\n    \"value\": \"franklin ave\"\n  },\n  {\n    \"label\": \"suburb\",\n    \"value\": \"crown heights\"\n  },\n  {\n    \"label\": \"city_district\",\n    \"value\": \"brooklyn\"\n  },\n  {\n    \"label\": \"state\",\n    \"value\": \"ny\"\n  },\n  {\n    \"label\": \"postcode\",\n    \"value\": \"11216\"\n  },\n  {\n    \"label\": \"country\",\n    \"value\": \"usa\"\n  }\n]\n```\n\nThis will break down the address into its [individual components](https://github.com/openvenues/libpostal?tab=readme-ov-file#parser-labels).\n\nEndpoint `/health` can be use to check webserver healthcheck (like in k8s env):\n\n```bash\n$ curl http://localhost:8000/health\n{\"status\":\"ok\"}\n```\n\n## Auth for server\n\nYou can set up either basic authentication or bearer token authentication to protect your web server, while keeping the `/health` endpoint public\n\n## Configuration\n\nConfiguration environment variables:\n\n```ini\nPOSTAL_SERVER_HOST - server host (default: 0.0.0.0)\nPOSTAL_SERVER_PORT or PORT - server port (default: 8000)\nPOSTAL_SERVER_TRUSTED_PROXIES - trusted proxies IP addresses (separated by comma)\nPOSTAL_SERVER_LOG_FORMAT - log format, can be \"json\" or \"text\" (default: \"text\")\nPOSTAL_SERVER_LOG_LEVEL - log level (default: \"info\")\nPOSTAL_SERVER_BASIC_AUTH_USERNAME - basic auth username (required if basic auth password is set)\nPOSTAL_SERVER_BASIC_AUTH_PASSWORD - basic auth password (required if basic auth username is set)\nPOSTAL_SERVER_BEARER_AUTH_TOKEN - bearer auth token\n```\n\n## Development\n\nLocal build:\n\n```bash\ndocker build -t postal-server .\n```\n","funding_links":["https://www.buymeacoffee.com/leopard"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fle0pard%2Fpostal_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fle0pard%2Fpostal_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fle0pard%2Fpostal_server/lists"}