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

Uploaded Python 3

File details

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

File metadata

  • Download URL: jsonix-0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 9787f4a22d2477476e67c6928fc03f2e0d1028876b396a6c2cf62e7eebfc90a5
MD5 25cd19141420ac20886db5928b2e0863
BLAKE2b-256 958ec2d8b6468a94e071915c57ba0ad4cf5d31a52b9c40eea8737410cec431ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jsonix-0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 470e0320ced68c8d50b19928bb3c4085fe5f443d5cc45facf601c75d26acc2c7
MD5 bb69e76e8e81e1fe10432e2c5d3e478c
BLAKE2b-256 8dde536a928e3b2ef7d0064e61a32060435784c7b0718eb84100f64e60d01bf7

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