Ferramenta para extração de conteúdo de arquivos
Project description
Tools Content File Extractor
Extrator de conteúdo de arquivos com suporte a PDFs e integração com APIs de IA (Google Gemini e Azure OpenAI).
Pré-requisitos
- Python 3.8+
- Poetry (para gerenciamento de dependências)
Instalação
- Clone o repositório:
git clone <repository-url>
cd tools-content-file-extractor
- Instale as dependências usando Poetry:
poetry install
- Configure as variáveis de ambiente:
cp env.example .env
Configuração das Variáveis de Ambiente
Este projeto requer as seguintes variáveis de ambiente para funcionar corretamente:
Variáveis Obrigatórias
| Variável | Descrição | Exemplo |
|---|---|---|
GOOGLE_API_KEY |
Chave da API Google Gemini | your_google_api_key_here |
OPENAI_API_URL |
URL da API Azure OpenAI | https://your-resource.openai.azure.com |
OPENAI_API_KEY |
Chave da API Azure OpenAI | your_azure_openai_api_key_here |
ENVIRONMENT |
Ambiente de execução | development, production |
Como Configurar
- Copie o arquivo de exemplo:
cp env.example .env
- Edite o arquivo
.enve preencha as variáveis:
# Configurações da API Google Gemini
GOOGLE_API_KEY=your_google_api_key_here
# Configurações da API Azure OpenAI
OPENAI_API_KEY=your_azure_openai_api_key_here
OPENAI_API_URL=https://your-resource.openai.azure.com
# Ambiente de execução
ENVIRONMENT=development
Obtenção das Chaves de API
- Google API Key: Acesse o Google Cloud Console e habilite a API Gemini
- Azure OpenAI: Configure no Azure Portal e obtenha as credenciais necessárias
Uso
Ativar o Ambiente Virtual
poetry env activate
source .venv/bin/activate
Executar o Projeto
poetry run python main.py
Estrutura do Projeto
tools-content-file-extractor/
├── business/ # Lógica de negócio
│ ├── azure/ # Serviços Azure OpenAI
│ ├── context/ # Contexto e configurações
│ ├── output/ # Geradores de saída
│ ├── pdf/ # Extratores de PDF
│ └── security/ # Serviços de segurança
├── storage/ # Serviços de armazenamento
├── tools/ # Ferramentas auxiliares
├── docs/ # Documentação
└── docs-exemplos/ # Exemplos de documentos
Funcionalidades
- Extração de conteúdo de PDFs
- Processamento com IA (Google Gemini e Azure OpenAI)
- Geração de saída em JSON
- Armazenamento seguro de dados
- Criptografia de informações sensíveis
Contribuição
- Faça um fork do projeto
- Crie uma branch para sua feature (
git checkout -b feature/AmazingFeature) - Commit suas mudanças (
git commit -m 'Add some AmazingFeature') - Push para a branch (
git push origin feature/AmazingFeature) - Abra um Pull Request
Licença
Este projeto está sob a licença MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file onedevcommonfileextractor-1.0.5.tar.gz.
File metadata
- Download URL: onedevcommonfileextractor-1.0.5.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6ebd494ea54f1b991cc3e60861d80f526430b4f94572ecb8eb8130166fe8636
|
|
| MD5 |
402948b474f1877b9685712be0e85700
|
|
| BLAKE2b-256 |
930695844063cbce9850aea26bf4042d7c3ed8900b962313683dd43eaac440ea
|
File details
Details for the file onedevcommonfileextractor-1.0.5-py3-none-any.whl.
File metadata
- Download URL: onedevcommonfileextractor-1.0.5-py3-none-any.whl
- Upload date:
- Size: 39.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
951c17af74725eb5009c03122cab63b555387b98e4c8e5e99f51effa6be47f8f
|
|
| MD5 |
a12974814c25b712446593b5d4436178
|
|
| BLAKE2b-256 |
0e45d3e8861e1d52fca410a5fcbbcfa26e320adaa406d0077fd98ab9990bc492
|