Skip to main content

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

exceljsontoolkit-0.1.2.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exceljsontoolkit-0.1.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file exceljsontoolkit-0.1.2.tar.gz.

File metadata

  • Download URL: exceljsontoolkit-0.1.2.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

Hashes for exceljsontoolkit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 15163a18ee39b8635f1f5361a0f2116c4327cae3eb4250794253d6e220ab2bf3
MD5 488b51e34b027ea1e7c38bc361c7db0c
BLAKE2b-256 e31c3d0f914eb1221170333be5e70b40c25772721dd203e836dbb97c2f034387

See more details on using hashes here.

File details

Details for the file exceljsontoolkit-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for exceljsontoolkit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7450a800a7dbbcc5db64b1b670b89ccaa9a5abfa62b5239c7d0018ae99014341
MD5 5595575ded3450967741b5e53d9a05a7
BLAKE2b-256 b7bd391a9cb7340cbf1b23a4e6051010a9fbba4059cfff139669321e1d58cebc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page