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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jsonix-0.4.tar.gz
Algorithm Hash digest
SHA256 63c48b57c8a954117dcd41fc6e257df5594c9c3db117c96f0d6e5d48e456fe93
MD5 6f5ebdc98d6d53b928b139f63ac5e042
BLAKE2b-256 fa1aa152a24cf0d36c0435aae9948fd484b64e15575c4c9cce473c77f78ebca7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jsonix-0.4-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.10.12

File hashes

Hashes for jsonix-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e0053715ff40c6b910e70283991b6fdc89efb57ab61b225b1a11be5432811395
MD5 c2314495b8ff9a10ecd35131c1b21272
BLAKE2b-256 91e670288fc3a1199382fa749438555710b1dde2d2839cae0c6526281965fb6a

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