semvec/pypi-packages huggingface dataset:
ayrun-jsonkit 1.1.0
A library for enhanced JSON file handling with support for datetime and UUID objects, both synchronously and asynchronously.
License: MIT
Requires Python: <4.0,>=3.12

<p align="center">
  <img src="./assets/jsonkit_logo.png" alt="JSONKit Logo"/>
</p>
<hr>
<h4 align="center">🚀 <i>Your toolkit for seamless JSON handling.</i></h4>

<p align="center">
  <a href="#️overview">Overview</a> •
  <a href="#features">Features</a> •
  <a href="#installation">Installation</a> •
  <a href="#usage">Usage</a> •
  <a href="#license">License</a> •
  <a href="#contributing">Contributing</a>
</p>

# Overview

JSONKit is a Python Library for enhanced JSON file handling with support for `datetime` and `UUID` objects. It provides both `synchronous` and `asynchronous` file operations.

## Features

- **Synchronous Operations**: Read and write JSON files with custom encoding and decoding for `datetime` and `UUID` objects.
- **Asynchronous Operations**: Handle JSON files asynchronously using `aiofiles`.
- **Custom Serialization**: Special handling for `datetime` and `UUID` types.

## Installation

You can install JSONKit via pip:

```bash
pip install ayrun-jsonkit
```

## Usage

#### Synchronous Usage:

```python
from jsonkit import JSONFile
from datetime import datetime
import uuid

# Initialize the JSONFile object
json_file = JSONFile('example.json')

# Write data to the file
data = {
    "name": "Alice",
    "age": 30,
    "created_at": datetime.now(),
    "id": uuid.uuid4()
}

# The 'write' function automatically returns the loaded data. So you can either choose to do this:
loaded_data = json_file.write(data, indent=4)
print(loaded_data)

# Or:
json_file.write(data, indent=4)
loaded_data = json_file.load()
print(loaded_data)
```

#### Asynchronous Usage:

```python
from jsonkit import AsyncJSONFile
from datetime import datetime
import uuid
import asyncio

async def main():
    # Initialize the AsyncJSONFile object
    async_json_file = AsyncJsonFile('data.json')

    # Write data to the file
    data = {
        "name": "Bob",
        "age": 25,
        "created_at": datetime.now(),
        "id": uuid.uuid4()
    }

    # The 'write' function automatically returns the loaded data. So you can either choose to do this:
    loaded_data = await async_json_file.write(data, indent=4)
    print(loaded_data)

    # Or:
    await async_json_file.write(data, indent=4)
    loaded_data = await async_json_file.load()
    print(loaded_data)

# Run the async main function
asyncio.run(main())
```

## License

JSONKit is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.

## Contributing

Contributions are welcome! Please open an issue or submit a pull request.
Ran-JIT 0.1.1
A python lib when imported boosts your code using JIT
License: MIT
Keywords: booster

Our library uses Just-In-Time (JIT) compilation to enhance performance significantly. Unlike the traditional Python Virtual Machine (PVM) which interprets bytecode, JIT compilation translates code into optimized machine code at runtime, allowing it to execute much faster. This means that when you import our library, you benefit from improved execution speeds due to the dynamic compilation of frequently executed code paths. By utilizing JIT, we ensure that our library performs optimally, addressing the common performance bottlenecks associated with standard Python execution and providing a more efficient and responsive experience for your applications.


Change Log
==========

0.0.1(26/8/2024)
- Initial version.
0.0.2(26/8/2024)
- test
0.0.3(26/8/2024)
- test 3
0.0.4(26/8/2024)
- test 4
0.0.5(27/8/2024)
- test 5
0.0.6(28/8/2024)
- test 6
0.0.7(29/8/2024)
- Added more support to UNIX, boosted code
0.0.8(31/8/2024)
- test
0.0.9(16/9/2024)
- Adding Network Boost
0.1.0(17/9/2024)
- Adding Network Boost
0.1.1(17/9/2024)
- Adding Network Boost