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

json2csv_manu06-1.0.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for json2csv_manu06-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a5e364e5906b4da0688b58fc643ecd0f5b3b909ba69be39e959ec448b65eba6e
MD5 baf6a60ea8bed5315450193d2587f923
BLAKE2b-256 4f280e0c361e9e09bbf07290be03d80fde40727fd278ef82b399135a4cc0cc7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for json2csv_manu06-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87427f523411ea6f00464dacb1e2cad85302ea399b91b7db18784592803e568d
MD5 b3098bf27c5f728c3396766e362230ce
BLAKE2b-256 df698a579fc7d76a62a713fc51df5710f94a546f45a192b91b1a5284537c6b72

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