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.2.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.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jsonix-0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 1169658f22a92051e0ed26bbe75223a7e759ffbfe0ed4c09e1a8d67f0f45e025
MD5 1c6f3b7f047a76f0bbeba945091a7cfa
BLAKE2b-256 b4014b11551ac560a308c618d93bd6dc19d4d36bbd764060e6ae3cfb1438408a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jsonix-0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f9293a877c1ae0d103706f2d5cbbc0a1e9d5185bc0eb51c6b50b3feca5d87e64
MD5 aac401d5be976c12c634c7c7c6fcbb0a
BLAKE2b-256 c115f2665af3ef1d8f6389c84f28543955e9780367fd6856059c5e28ac01b9d2

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