Metadata-Version: 2.1
Name: db_in_json
Version: 1.0.1
Summary: A small json database
Author: BDN_fr
Project-URL: Homepage, https://github.com/BDN-fr/db_in_json
Project-URL: Issues, https://github.com/BDN-fr/db_in_json/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# DB_in_JSON: A Simple JSON-Based Database Library

DB_in_JSON is a Python library designed to provide a simple and lightweight solution for managing data using JSON files. It offers basic CRUD (Create, Read, Update, Delete) operations for collections of data, allowing for efficient storage and retrieval.

## Features

- Create and manage JSON-based databases.
- Create, read, update, and delete collections within the database.
- Insert, select, update, and delete data within collections.
- Utilize conditional operations for data manipulation.

## Installation

You can install DB_in_JSON with PyPI with the command :

```sh
pip install DB_in_JSON
```

## Usage

Here's a simple example of how to use DB_in_JSON:

```python
from db_in_json import DB

# Create a database (create the file if needed)
db = DB('DB.json')

# Get a collection (create it if it doesn't exist)
test_collection = db.getCollection('test_collection')

# Insert data into the collection
insert_uuid = test_collection.queries['insert']('Some good data')

# Select data from the collection
selected_items = test_collection.queries['select'](lambda uuid, data: True)

# Update data in the collection
updated_amt = test_collection.queries['update'](lambda uuid, data: True, 'Another updated data')

# Delete data from the collection
deleted_amt = test_collection.queries['delete'](lambda uuid, data: True)
```

## Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

## License

This project is licensed under the MIT License. See the LICENSE file for details.
