🟡 Pleno — Wrapper assíncrono para ViaCEP com cache em memória
flowchart TD
A([GET /cep/01310-100]) --> B{No cache?}
B -->|Sim| C[Retornar cached]
B -->|Não| D[GET ViaCEP]
D --> E{CEP existe?}
E -->|Não| F[404 Not Found]
E -->|Sim| G[Normalizar dados]
G --> H[Salvar no cache]
H --> I[Retornar endereço]
- Python 3.11+
- FastAPI
- httpx (async)
- ViaCEP API
pip install -r requirements.txt
uvicorn main:app --reload
# GET http://localhost:8000/cep/01310100api-cep-py/
├── main.py
└── requirements.txt