Skip to main content

A Python package to manipulate objects in JSON files.

Project description

https://travis-ci.com/pandrey2003/JSONManipulator.svg?branch=master https://coveralls.io/repos/github/pandrey2003/JSONManipulator/badge.svg?branch=master CodeFactor Updates Python 3 Documentation Status https://pepy.tech/badge/jsonmanipulator

JSONManipulator is a Python package to retrieve, add, delete, change and store objects in JSON files.

Installation

Use the package manager pip to install JSONManipulator.

pip install JSONManipulator

Usage

Firstly, you need to set up your initial JSON file.

from JSONManipulator import set_up

set_up(
    full_path="enter/full/path/to/your/file/here"
)

Functionality

As soon as you set up your file, you can use classes of the package:

  1. GetInformation (retrieve information about particular objects in the file).

  2. ChangeValue (change values of particular objects in the file).

  3. ChangeAllValues (change values of all objects in the file).

  4. DeleteObject (delete particular objects in the file).

  5. AddObject (add a new object to the file).

  6. AddKey (add a new key to each object in the file).

More detailed information about the usage of the package can be found in the examples and docs folders.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

History

1.0 (2020-07-8)

  • The first release of JSONManipulator.

1.1 (2020-07-12)

  • Added docstrings to the package and the examples directory.

2.0 (2020-07-12)

  • Made more out-of-the-box functionality of the package.

  • Minor optimization of the core module.

3.0 (2020-07-17)

  • Added Pytests.

  • Added documentation (using sphinx-documentation).

  • Added Tox support.

  • Tested code coverage - 92%.

  • Enabled Travis CI.

  • Resolved 1 bug with the deletion of one book.

  • Optimized cap_sentence(), making it non-static.

  • Shortened the relevant lines of code by applying the knowledge of the copy function.

  • Deployed __slots__, saving RAM when using the package.

3.0.1 (2020-07-18)

  • Created more tests which resulted in code coverage of 97.3%.

  • Minor optimization of the core module.

3.0.2 (2020-07-20)

  • Resolved date misprint in HISTORY.rst.

  • Created more advanced structure for requirements.

  • Made requirements for installations the package more rigorous.

  • Deployed EditorConfig for better code consistency.

  • Added Makefile in the root directory.

  • Made use of the pyup bot (checks dependencies).

3.1 (2020-08-07)

  • Used try/except in tests instead of sys.exit(0) in core module.

  • The package is now easy-to-use in Python terminal (the programme will not be aborted).

3.1.1 (2020-09-04)

  • Split core module to separate files, which resulted in a better readable code.

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

JSONManipulator-3.1.1.tar.gz (144.9 kB view hashes)

Uploaded Source

Built Distribution

JSONManipulator-3.1.1-py3-none-any.whl (27.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page