{"id":26397866,"url":"https://github.com/esscova/api-currency-converter","last_synced_at":"2026-05-17T12:05:36.486Z","repository":{"id":282627033,"uuid":"949177345","full_name":"esscova/api-currency-converter","owner":"esscova","description":"API conversora de moedas.","archived":false,"fork":false,"pushed_at":"2025-03-15T21:12:25.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T22:20:52.874Z","etag":null,"topics":["fastapi","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/esscova.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}},"created_at":"2025-03-15T21:09:43.000Z","updated_at":"2025-03-15T21:13:31.000Z","dependencies_parsed_at":"2025-03-16T01:01:23.148Z","dependency_job_id":null,"html_url":"https://github.com/esscova/api-currency-converter","commit_stats":null,"previous_names":["esscova/api-currency-converter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/esscova/api-currency-converter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esscova%2Fapi-currency-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esscova%2Fapi-currency-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esscova%2Fapi-currency-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esscova%2Fapi-currency-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esscova","download_url":"https://codeload.github.com/esscova/api-currency-converter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esscova%2Fapi-currency-converter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33137831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["fastapi","python"],"created_at":"2025-03-17T12:19:18.369Z","updated_at":"2026-05-17T12:05:36.469Z","avatar_url":"https://github.com/esscova.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Currency Converter API\n\nEste projeto é uma API de conversão de moedas construída com FastAPI. Ela consome a API [Alpha Vantage](https://www.alphavantage.co/#page-top) para obter taxas de câmbio em tempo real e oferece endpoints para converter valores entre diferentes moedas.\n\n## Funcionalidades\n\n- Conversão síncrona de moedas\n- Conversão assíncrona de moedas\n- Suporte para conversão entre múltiplas moedas simultaneamente\n\n## Estrutura do Projeto\n\n```\n.\n├── main.py\n├── routers.py\n├── converter.py\n└── models.py\n```\n\n- `main.py`: Ponto de entrada da aplicação FastAPI\n- `routers.py`: Define as rotas e endpoints da API\n- `converter.py`: Contém a lógica de conversão de moedas\n- `models.py`: Define os modelos Pydantic para validação de entrada e saída\n\n## Endpoints\n\n1. `/converter/{from_currency}`: Conversão síncrona\n2. `/converter/async/{from_currency}`: Conversão assíncrona\n3. `/converter/async/v2/{from_currency}`: Conversão assíncrona com modelo de entrada\n\n## Configuração\n\n1. **Clone o repositório:**\n\n   ```bash\n   git clone https://github.com/esscova/api-currency-converter.git\n   cd api-currency-converter\n   ```\n\n2. **Crie e ative um ambiente virtual:**\n\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # Windows: venv\\Scripts\\activate\n   ```\n\n3. **Instale as dependências:**\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Execute:**\n\n   ```bash\n   uvicorn main:app --reload\n   ```\n\n5. **Configure as variáveis de ambiente:**\n   - `API_KEY`: Sua chave da API Alpha Vantage para requisições.\n\n\n## Como executar\n\nPara iniciar o servidor:\n\n```bash\nuvicorn main:app --reload\n```\n\nAcesse a documentação interativa da API em `http://localhost:8000/docs`\n\n## Exemplos de Uso\n\n### Conversão Síncrona\n\n```\nGET /converter/USD?to_currencies=BRL,EUR\u0026price=100\n```\n\n### Conversão Assíncrona\n\n```\nGET /converter/async/USD?to_currencies=BRL,EUR,JPY\u0026price=100\n```\n\n### Conversão Assíncrona v2\n\n```\nGET /converter/async/v2/USD\n\nBody:\n{\n  \"price\": 100,\n  \"to_currencies\": [\"BRL\", \"EUR\", \"JPY\"]\n}\n```\n\n## Notas\n\n- Este projeto utiliza a API Alpha Vantage para obter taxas de câmbio em tempo real. Certifique-se de respeitar os limites de requisições da sua chave de API.\n- A validação de entrada é implementada usando Pydantic e parâmetros de caminho/consulta do FastAPI.\n\n## Contribuições\n\nContribuições são bem-vindas! Por favor, abra uma issue para discutir mudanças propostas ou envie um pull request.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesscova%2Fapi-currency-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesscova%2Fapi-currency-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesscova%2Fapi-currency-converter/lists"}