semvec/pypi-packages huggingface dataset:
json-enhanced 0.2.6
Translates Django ORM query system to json objects
Requires Python: >=3.8, <4
Keywords: json,query,django


![PyPI - Python Version](https://img.shields.io/pypi/pyversions/json-enhanced)
![PyPI](https://img.shields.io/pypi/v/json-enhanced)
# JSON Enhanced

JSON Enhanced implements fast and pythonic queries and mutations for JSON objects. 

# Installation

You can install json-enhanced with pip:

```
pip install json-enhanced
```
# Quickstart
```python
import jsonutils as js
from datetime import datetime

# We create a new JSONObject either directly or from a local file/URL:
json_data = js.JSONObject(
    {
        "data": [
            {
                "name": "Dan",
                "birthday": "1991-01-02 09:00:00",
                "publications": 15
            },
            {
                "name": "Mar",
                "birthday": "1991-03-02 12:30:00",
                "publications": 13
            },
            {
                "name": "Carl",
                "birthday": "1950-06-02 16:00:00",
                "publications": 36
            },
            {
                "name": "Vic",
                "birthday": "1986-07-02 16:00:00",
                "publications": None
            },
        ]
    }
)

# Now we can navegate through this object by attribute accesion:
json_data.data._1.name
# 'Mar'

# Or we can make queries. The syntax is very similar to Django's querysets:
result = json_data.query(birthday__lt=datetime(1985,1,1))

result
# <QuerySet ['1950-06-02 16:00:00']>

result.first().parent
# {'name': 'Carl', 'birthday': '1950-06-02 16:00:00', 'publications': 36}

# We can also retrieve the path of a node:
result.first().jsonpath
# data/2/
```

# Documentation

Detailed documentation is available at [json-enhanced.readthedocs.io](https://json-enhanced.readthedocs.io/en/latest).

# Contributing

Contributions are welcome! Please take a look at our contributors guide.

# Code of Conduct

Please read [CODE_OF_CONDUCT.md](https://github.com/Collisio/json-enhanced/CODE_OF_CONDUCT.md) for details on our code of conduct.

# License

This project is licensed under the *GPL-3.0 License*. For details, please read our [LICENSE FILE](https://github.com/Collisio/json-enhanced/LICENSE).
rabbitmq2solr 1.0.0
RabbitMQ to Solr Indexer
Requires Python: >3.8.*, <4

# rabbitmq2solr

rabbitmq2solr is a simple utility that consumes messages from a RabbitMQ queue and index to Solr.
Messages are expected to be JSON documents that send to Solr update endpoint. If indexing fails, the message is sent to a dead letter queue for later use.
The messages that sent to DLQ, delivered as persistent messages. This job will exit when the queue is empty.

# Environment Variables

- `MQ_HOST`: The hostname of the RabbitMQ server.
- `MQ_PORT`: The port of the RabbitMQ server. Optional. Default: 5672.
- `MQ_USER`: The username to use when connecting to the RabbitMQ server.
- `MQ_PASS`: The password to use when connecting to the RabbitMQ server.
- `MQ_VHOST`: The virtual host to use when connecting to the RabbitMQ server.
- `MQ_QUEUE`: The name of the queue to consume messages from.
- `MQ_QUEUE_DURABLE`: Whether or not the queue should be durable. Optional. Default: True.
- `MQ_DLQ_EXCHANGE`: The exchange of the dead letter queue to use. If index errors occur, messages will be moved to this queue.
- `MQ_DLQ_ROUTING_KEY`: The routing key of the dead letter queue to use.
- `SOLR_BASE_URL`: The base url of the Solr server. Example: http://localhost:8983/solr (without trailing slash).
- `SOLR_COLLECTION`: The name of the Solr collection to index to. Optional. Default: Routing key of message.
- `LOG_LEVEL`: The log level to use. Optional. Default: DEBUG.
- `CONSUMER_POOL_SIZE`: The number of concurrent consumers to use.