Skip to main content

A versatile CLI and GUI tool for converting structured sentences to JSON, YAML, and XML, and querying data files.

Project description

DataForge

A versatile Python utility providing both a Graphical User Interface (GUI) and a Command Line Interface (CLI) for data conversion and simple querying of JSON, YAML, and XML files.

Features

  • DataFy: Convert simple, structured sentences into valid JSON, YAML, and XML.
  • QueriFy: Query the contents of JSON, YAML, or XML files using simple, human-readable questions.
  • GUI: Modern, PyQt6-based interface with automatic documentation.
  • CLI: Seamless integration via pipx for use in scripts and automation.

🚀 Installation

DataForge is best installed using pipx, which installs it into an isolated environment and makes the dataforge command easily accessible in your terminal.

Prerequisites: You must have Python 3.8+, venv, and pipx installed.

pipx install dataforge_cli-gui_app

Usage

1. GUI Mode

Simply run the command with no arguments to launch the application and documentation window:

dataforge

2. CLI Mode: Convert (DataFy)

Convert a structured sentence into a data format and output it to the console or a file. Syntax: dataforge convert "SENTENCE" --format [json|yaml|xml] [-o OUTPUT_FILE]

# Example: Convert to JSON and print to console
dataforge convert "User is Rudra, Location is Home, Age is 10" -f json

# Example: Convert to XML and save to a file
dataforge convert "Project is DataForge, Status is Completed" --format xml -o project.xml

3. CLI Mode: Query (QueriFy)

Query data from a file using simple questions. Syntax: dataforge query -i INPUT_FILE -t [json|yaml|xml] -q "QUERY" [-o OUTPUT_FILE]

Query Type Structure Example Description
Fetch Value "Key Name = ?" "Name = ?" Returns the value associated with the key.
Condition "Numeric Key > Value" "Age > 18" Checks if a key's numeric value is greater than the specified value.
# Example: Query a YAML file for a specific value
dataforge query -i config.yaml -t yaml -q "version = ?"

# Example: Query a JSON file for a condition check
dataforge query -i data.json -t json -q "score > 90"

LICENSE

DataForge is released under the MIT License.

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

dataforge_cli_gui_app-0.1.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

dataforge_cli_gui_app-0.1.1-py2.py3-none-any.whl (9.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file dataforge_cli_gui_app-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for dataforge_cli_gui_app-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7a9ad636096623d4eeed42cee1ac7a69d8d3f9cc00c79a7986ca0847c3f2d481
MD5 a018a73a5ccc9e52bf707ddf56b392f9
BLAKE2b-256 4d14e0b3b0a5113d7bed540c842b4ccc8de98b33eab159003348ded79d33ef75

See more details on using hashes here.

File details

Details for the file dataforge_cli_gui_app-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dataforge_cli_gui_app-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b06cacd8ccb0812d599e340d0e03820dbf372a7d84fdb4d342937d2de7d02ed0
MD5 218efaa398af6ebddabe05e06a02477f
BLAKE2b-256 eeb5c8b477558b1295bc47c99fa06c2af8624a107b62df9ca2d578ab702523e3

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