Skip to main content

Easy JSON manager with path-based access and edit support.

Project description

📦 Jsonix

Jsonix is a lightweight and easy-to-use JSON manager for Python. It allows you to read, write, modify, and delete data in a JSON file without losing its structure. With path-based access, you can interact with any data.json file in a straightforward and intuitive way.


🚀 Features

  • Add data at any nested path (add)
  • Remove data from a specified path (remove)
  • Change existing data (change)
  • Get data from any path (get)
  • Show the entire JSON structure (show)
  • Clear the entire JSON data (clear)
  • Auto-create missing nested structures

📥 Installation

To install Jsonix, simply use pip:

pip install jsonix

Once installed, you can start using Jsonix to manage your JSON data easily:

Example:

from jsonix import jsonix

Initialize with the path to your JSON file

json = jsonix.register("data.json")

Add data to a nested path

json.add("hello,uz", "salom")
json.add("hello,ru", "привет")

Get data from a path

print(json.get("hello,uz"))  # Output: salom

Change data at a specific path

json.change("hello,ru", "Здравствуйте")

Show the entire JSON data

print(json.show())

Remove data from a specific path

json.remove("hello,ru")

Clear the entire JSON file

json.clear()

Example Output:

{
  "hello": {
    "uz": "salom"
  }
}

⚙️ Configuration and Customization The Jsonix library works by loading and saving the JSON file on every operation. It automatically handles missing paths and creates them when necessary. You can use it for various configurations and JSON structures.

👨‍💻 Contributing Feel free to fork this repository, create a pull request, and submit any improvements or bug fixes. Contributions are always welcome!

📄 License This project is licensed under the MIT License - see the LICENSE file for details.

📌 Links

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

jsonix-0.3.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

jsonix-0.3-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file jsonix-0.3.tar.gz.

File metadata

  • Download URL: jsonix-0.3.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for jsonix-0.3.tar.gz
Algorithm Hash digest
SHA256 3120cc930cb8b3fd1519b68abf556c89753cc2e32ded75ec7fd98c7fa0134ddf
MD5 0b437b567f5a171bcfb4e2b1abeec288
BLAKE2b-256 1ab48fbc8450c5b01dbc97c6a5c6d9e1c9268d7862d2b495286198942529fe4e

See more details on using hashes here.

File details

Details for the file jsonix-0.3-py3-none-any.whl.

File metadata

  • Download URL: jsonix-0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for jsonix-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 517434f71ef2e889eb5ee73fc7535439a28d0016b97bf2ae0d608acdc99d9dd9
MD5 b6e9e369a3cae69323049417afbf66c6
BLAKE2b-256 2b3a6da1cb675b017dcebaac5a9a02e3df7315ed0caf8cb2598453a4d1b00ab5

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