A toolkit to extract structured JSON from Excel, load it, and generate context maps.
Project description
Excel JSON Toolkit
Excel JSON Toolkit is a Python package that allows you to:
-
Extract structured JSON data from Excel files using OpenAI's LLMs.
-
Load JSON files into Python dictionaries.
-
Analyze and generate context maps describing the contents and dependencies of JSON files.
📦 Installation
pip install exceljsontoolkit
Note: Requires Python 3.7+
🔧 Requirements
-
pandas
-
openai
-
python-dotenv
These will be automatically installed with the package.
You also need to create a .env file with your OpenAI API key:
OPENAI_API_KEY=your_openai_key_here
🧠 Features
✅ Extract Structured JSON from Excel
Uses OpenAI's GPT model to clean, extract, and standardize tabular data from Excel sheets into well-structured JSON files.
from exceljsontoolkit import StructuredDataExtractor
extractor = StructuredDataExtractor(output_dir="output", model="gpt-4o")
extractor.extract("your_excel_file.xlsx")
✅ Load JSON Files
Loads JSON files and returns them as a dictionary.
from exceljsontoolkit import LoadJsonFiles
loader = LoadJsonFiles()
data = loader.load_json_files("output/sheet1.json")
✅ Generate Context Map
Analyzes JSON structure and relationships between files.
from exceljsontoolkit import GenerateJsonContextMap
mapper = GenerateJsonContextMap()
context = mapper.generate_json_context_map(data)
print(context)
📁 Example Folder Structure
my_project/
├── your_excel_file.xlsx
├── output/
│ ├── Sheet1.json
├── .env
📃 License
This project is licensed under the MIT License.
Author
Developed by Mahdi Jaffery
Project details
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 exceljsontoolkit-0.1.0.tar.gz.
File metadata
- Download URL: exceljsontoolkit-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
747a9a81a705592d499afbce737ee748310eef7b4983293d9908ad78bcd4c228
|
|
| MD5 |
9aeef7f65f4d4fb3b67c73f9a68ca4e6
|
|
| BLAKE2b-256 |
51b897c1a33ff57b5e0595f7c24f0a7281c01caae425c2ee85cb77a5ab5031b0
|
File details
Details for the file exceljsontoolkit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: exceljsontoolkit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7e6a3b8963c7402e5d792ad72c8a9dbdee454d5c3bc0256946fd7b6e4317a8d
|
|
| MD5 |
c166f867ee1747af7c80ceda074ff800
|
|
| BLAKE2b-256 |
802b004383b88bc3692e550e10b6d644e5267b164d598407ebc5bcfe57f42ab9
|