Skip to main content

A professional JSON to CSV conversion library

Project description


File: README.md

# json2csv-pro

A professional, feature-rich Python library for converting JSON data to CSV format with advanced capabilities.

## Features

- ✨ Convert JSON to CSV with ease
- 🔄 Handle nested JSON structures automatically
- 📊 Batch conversion support
- ✅ Data validation
- 🎨 Customizable delimiters and formatting
- 📝 Comprehensive documentation
- 🔍 Type hints for better IDE support
- ⚡ High performance

## Installation

```bash
pip install json2csv-pro

Quick Start

from json2csv_pro import JSONConverter

# Create converter instance
converter = JSONConverter()

# Simple conversion
data = [
    {"name": "John", "age": 30, "city": "NYC"},
    {"name": "Jane", "age": 25, "city": "LA"}
]

converter.convert_to_csv(
    data=data,
    output_file="output.csv"
)

Advanced Usage

Handling Nested JSON

data = [
    {
        "name": "John",
        "age": 30,
        "address": {
            "city": "NYC",
            "country": "USA"
        }
    }
]

converter.convert_to_csv(
    data=data,
    output_file="output.csv",
    flatten_nested=True,
    delimiter=','
)

Batch Conversion

converter.convert_batch(
    input_files=["file1.json", "file2.json", "file3.json"],
    output_dir="output/",
    flatten_nested=True
)

Preview Before Converting

preview = converter.preview_conversion(
    data=data,
    rows=5
)
print(preview)

Documentation

Full documentation available at: Read the Docs

Contributing

Contributions are welcome! Please read our Contributing Guide.

License

MIT License - see LICENSE file for details.

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

json2csvlib-1.0.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

json2csvlib-1.0.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file json2csvlib-1.0.0.tar.gz.

File metadata

  • Download URL: json2csvlib-1.0.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for json2csvlib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9bcf21301ac345731621078ebc0ef753b2cd0091eed21667f4d83e13959909d5
MD5 d0893bf861149d9d1577f5d5dac920f9
BLAKE2b-256 9903b97816b62d7e634ad44b0fd0a277d4919d784a052c4278ed46024b1d7f06

See more details on using hashes here.

File details

Details for the file json2csvlib-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: json2csvlib-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for json2csvlib-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6446a8922232a4bcf122c31b98bf423e4d07f9ab0017bd365f7ca54b9eb34aa8
MD5 8c051d24fb338c9d0d007cf52acdc01b
BLAKE2b-256 c57f38873f5c13d47acf07d1dbe4ffbf7f2fecc9d162bdf49e5389c05633efbc

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