semvec/pypi-packages huggingface dataset:
jsonblob 0.0.2
Non official jsonblob api client
Requires Python: >=3.8
Keywords: jsonblob

# jsonblob

Non official jsonblob api client

```bash
pip install jsonblob
```

## Official API

<https://jsonblob.com/api>

## Usage

```python
from jsonblob import JSONBlobClient

json_blob_client = JSONBlobClient()

blob_id = json_blob_client.create({"hello": "world"})
json_blob_client.update({"zebra": "bebra"})

print(json_blob_client.get(blob_id))
```

Custom Json Blob storage

```python
from jsonblob import JSONBlobStorage

# Create blob to store keys. Usually once and than keys_blob_id is hardcoded
keys_blob_id = JSONBlobStorage.create()
# Create storage
json_blob_storage = JSONBlobStorage(keys_blob_id)

# Print keys blob id (stores keys map)
print(json_blob_storage.keys_blob_id)
# Print keys
print(json_blob_storage.keys)

# Check if key exists
if "my_key" in json_blob.keys:
    print(json_blob_storage.get("my_key"))

# Set key and value
is_new_key = json_blob_storage.set("zebra", {"hello": "world"})

# Get value
value = json_blob_storage.get("zebra")
print(value)
```