{"id":13813636,"url":"https://github.com/mstuttgart/brazilcep","last_synced_at":"2025-04-04T08:06:55.962Z","repository":{"id":5026675,"uuid":"41962201","full_name":"mstuttgart/brazilcep","owner":"mstuttgart","description":":brazil: Minimalist and easy-to-use python library designed to query CEP (Postal Address Code) data.","archived":false,"fork":false,"pushed_at":"2024-05-10T18:50:39.000Z","size":1339,"stargazers_count":191,"open_issues_count":0,"forks_count":54,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-05-19T07:28:12.270Z","etag":null,"topics":["address","api","apicep","brazil","buscacep","cep","correios","python","viacep","widenet"],"latest_commit_sha":null,"homepage":"https://brazilcep.readthedocs.io/en/latest/","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/mstuttgart.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":{"ko_fi":"mstuttgart"}},"created_at":"2015-09-05T13:38:24.000Z","updated_at":"2024-06-19T16:02:56.837Z","dependencies_parsed_at":"2023-07-05T21:32:17.828Z","dependency_job_id":"4e5e18be-76c3-4b96-b9e2-8e5e5837bd12","html_url":"https://github.com/mstuttgart/brazilcep","commit_stats":{"total_commits":557,"total_committers":14,"mean_commits":"39.785714285714285","dds":0.08797127468581689,"last_synced_commit":"c6195e187ff2efbbd99f3368ee620fab6fd08a62"},"previous_names":["mstuttgart/pycep-correios"],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstuttgart%2Fbrazilcep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstuttgart%2Fbrazilcep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstuttgart%2Fbrazilcep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstuttgart%2Fbrazilcep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mstuttgart","download_url":"https://codeload.github.com/mstuttgart/brazilcep/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142063,"owners_count":20890652,"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","api","apicep","brazil","buscacep","cep","correios","python","viacep","widenet"],"created_at":"2024-08-04T04:01:23.946Z","updated_at":"2025-04-04T08:06:55.918Z","avatar_url":"https://github.com/mstuttgart.png","language":"Python","funding_links":["https://ko-fi.com/mstuttgart"],"categories":["Python"],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003e\n  \u003ca href=\"https://pypi.org/project/brazilcep/\"\u003e\n    \u003cimg src=\"https://github.com/mstuttgart/brazilcep/assets/8174740/fb7c86c8-6261-4300-b2e0-65877084d865\" width=\"15%\" alt=\"BrazilCEP Logo\"\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  BrazilCEP\n\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n\n  \u003ca href=\"https://github.com/mstuttgart/brazilcep/actions?query=workflow%3A%22Github+CI%22\"\u003e\n    \u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/mstuttgart/brazilcep/test.yml?color=fcd800\u0026branch=main\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://codecov.io/gh/mstuttgart/brazilcep\"\u003e\n    \u003cimg alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/mstuttgart/brazilcep?color=fcd800\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://brazilcep.readthedocs.io/\"\u003e\n    \u003cimg alt=\"Read the Docs\" src=\"https://img.shields.io/readthedocs/brazilcep?color=fcd800\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://pypi.org/project/brazilcep\"\u003e\n    \u003cimg alt=\"Downloads\" src=\"https://img.shields.io/pypi/dm/brazilcep?color=fcd800\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://pypi.org/project/brazilcep\"\u003e\n    \u003cimg alt=\"PyPI Version\" src=\"https://img.shields.io/pypi/v/brazilcep.svg?color=fcd800\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://pypi.org/project/brazilcep/\"\u003e\n    \u003cimg alt=\"Python Versions\" src=\"https://img.shields.io/pypi/pyversions/brazilcep.svg?color=fcd800\"\u003e\n  \u003c/a\u003e\n\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#about\"\u003eAbout\u003c/a\u003e |\n  \u003ca href=\"#install\"\u003eInstall\u003c/a\u003e |\n  \u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e |\n  \u003ca href=\"#documentation\"\u003eDocumentation\u003c/a\u003e |\n  \u003ca href=\"#contribute\"\u003eContribute\u003c/a\u003e |\n  \u003ca href=\"#credits\"\u003eCredits\u003c/a\u003e\n\u003c/p\u003e\n\n## About\n\n**BrazilCEP** is a minimalist and easy-to-use Python library designed to query CEP (Postal Address Code) data.\n\nIts goal is to provide a unified query interface for multiple search services, simplifying the integration of Python applications with these services.\n\nCurrently, it supports several CEP APIs:\n\n- [ViaCEP](https://viacep.com.br)\n- [ApiCEP (WideNet)](https://apicep.com)\n- [OpenCEP](https://opencep.com)\n\n\u003e [!NOTE]\n\u003e **BrazilCEP** is the new name of the former **PyCEPCorreio** Python library.\n\u003e To migrate your old code to the new version, refer to the [migration guide](https://brazilcep.readthedocs.io/api.html#migrate-from-pycepcorreios).\n\n\u003e [!TIP]\n\u003e **CEP** or **Código de Endereçamento Postal** (_Postal Address Code_) is a system of numeric codes created, maintained, and organized by _Correios do Brasil_ to streamline address organization and delivery of letters and parcels.\n\n## Install\n\nTo install the latest stable release of BrazilCEP, use [pip](http://pip-installer.org):\n\n```sh\npip install brazilcep\n```\n\n## Quick Start\n\nMaking a request is straightforward. Start by importing the BrazilCEP module:\n\n```python\n\u003e\u003e\u003e import brazilcep\n```\n\nNext, use the `get_address_from_cep` function to query any CEP:\n\n```python\n\u003e\u003e\u003e address = brazilcep.get_address_from_cep('37503-130')\n```\n\nThe result is a dictionary containing the address details:\n\n```python\n\u003e\u003e\u003e address\n{\n    'district': 'rua abc',\n    'cep': '37503130',\n    'city': 'city ABC',\n    'street': 'str',\n    'uf': 'str',\n    'complement': 'str',\n}\n```\n\nThe CEP must always be provided as a string.\n\n\u003e [!TIP]\n\u003e BrazilCEP is designed for on-demand queries in web applications. Bulk querying through scripts or other means is discouraged.\n\n\u003e [!IMPORTANT]\n\u003e BrazilCEP does not guarantee the availability or support of any third-party query APIs. This library serves as a convenient interface for accessing these services.\n\n#### Asynchronous Requests with BrazilCEP\n\nBrazilCEP (version \u003e= 7.0.0) also supports asynchronous operations , allowing you to retrieve address information for a given CEP without blocking your application. This is particularly useful for web applications or services that require high responsiveness.\n\nTo perform an asynchronous request, use the `async_get_address_from_cep` function:\n\n```python\nimport asyncio\nimport brazilcep\n\nasync def main():\n  address = await brazilcep.async_get_address_from_cep('37503-130')\n  print(address)\n\nasyncio.run(main())\n```\n\u003e [!NOTE]\n\u003e This function is asynchronous and must be awaited when called.\n\u003e Ensure that your environment supports asynchronous programming before using this function.\n\n## Documentation\n\nComprehensive documentation for BrazilCEP is available on [ReadTheDocs](https://brazilcep.readthedocs.io/).\n\n## Contribute\n\nTo contribute, follow the guidelines outlined [here](https://brazilcep.readthedocs.io/contributing.html).\n\n## Credits\n\nCopyright (C) 2016-2024 by Michell Stuttgart\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstuttgart%2Fbrazilcep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmstuttgart%2Fbrazilcep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstuttgart%2Fbrazilcep/lists"}