https://github.com/copyleftdev/table_extractor_api
A FastAPI-based service for extracting tables from PDF files. The service supports extracting tables, rate limiting, and retrieving previously processed results.
https://github.com/copyleftdev/table_extractor_api
Last synced: 3 months ago
JSON representation
A FastAPI-based service for extracting tables from PDF files. The service supports extracting tables, rate limiting, and retrieving previously processed results.
- Host: GitHub
- URL: https://github.com/copyleftdev/table_extractor_api
- Owner: copyleftdev
- License: gpl-2.0
- Created: 2024-06-15T13:55:19.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-18T18:32:22.000Z (11 months ago)
- Last Synced: 2024-06-18T23:48:34.767Z (11 months ago)
- Language: Python
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# table_extractor_api
[](https://github.com/copyleftdev/table_extractor_api/issues)
[](https://github.com/copyleftdev/table_extractor_api/network)
[](https://github.com/copyleftdev/table_extractor_api/stargazers)
[](https://github.com/copyleftdev/table_extractor_api/blob/main/LICENSE)
[](https://github.com/copyleftdev/table_extractor_api/actions)



## Table Extractor API
A FastAPI-based service for extracting tables from PDF files. The service supports extracting tables, rate limiting, and retrieving previously processed results.
## Features
- Extract tables from PDF files.
- Rate limiting to prevent abuse.
- Retrieve previously processed results.
- Support for uploading multiple files with pagination (TODO).
- OAuth2 authentication (TODO).## Getting Started
### Prerequisites
- Docker
- Docker Compose### Installation
1. Clone the repository:
```bash
git clone https://github.com/copyleftdev/table_extractor_api.git
cd table_extractor_api
```2. Build and start the Docker containers:
```bash
docker-compose up --build
```### API Endpoints
#### Extract Tables from PDF
```bash
curl -X 'POST' \
'http://localhost:8000/extract_tables' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@/path/to/your/file.pdf'
```#### Retrieve Extraction Result by ID
```bash
curl -X 'GET' \
'http://localhost:8000/result/{result_id}' \
-H 'accept: application/json'
```### Development
1. Install dependencies:
```bash
pip install -r requirements.txt
```2. Run the development server:
```bash
uvicorn app.api:app --reload
```## Technology Stack



