Skip to main content

Python connector for DeepJSON server

Project description

deepjson-py-connector

A Python connector for interacting with DeepJSON, a flexible JSON document server for storage, scripting, and automation.


Features

  • 🔐 Login with username/password and manage JWT tokens
  • 📦 GET, POST, PUT, DELETE operations for keys
  • 🖼️ Upload and move binary files (PDFs, images, etc.)
  • 🧠 Scriptable value embedding using DeepJSON logic
  • ⚙️ Works in sync mode with any DeepJSON backend
  • ✅ Lightweight and dependency-friendly

Installation

pip install deepjson-py-connector

Usage

from deepjson_py_connector import DeepJSONConnector

client = DeepJSONConnector({
    "base_url": "http://localhost:3000",
    "token": "your-jwt-token"
})

# GET example
response = client.get("my-key")

# POST a JSON string
client.post("my-key", '{"name": "John"}')

# Upload a file
with open("receipt.pdf", "rb") as f:
    client.upload_file("receipts/july", f)

Flags & Options

Set optional flags before a request:

client.set_binary(True)           # If you want binary content
client.set_get_body(True)         # GET with body override
client.set_overwrite_key(True)    # POST can overwrite if enabled

All flags reset automatically after each request.


Testing

Tests are written with pytest.

pytest

Project Structure

deepjson_py_connector/
├── __init__.py
├── client.py      # Main connector logic
├── tests/
│   └── test_client.py
└── pyproject.toml

License

MIT © 2025 Eren Havuc

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

deepjson_py_connector-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deepjson_py_connector-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file deepjson_py_connector-0.1.0.tar.gz.

File metadata

  • Download URL: deepjson_py_connector-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for deepjson_py_connector-0.1.0.tar.gz
Algorithm Hash digest
SHA256 786cd0a8518294028caa469a3ac7934161970c2007e83ae084de69990e662f8f
MD5 591015cdb491b1b998977bf54cc75ce7
BLAKE2b-256 eab7ae10300e068ce8dee980448e6b79ba7123985a66c71276630555e8e6a937

See more details on using hashes here.

File details

Details for the file deepjson_py_connector-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deepjson_py_connector-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78ccbfc1390fc5416edb2c223940dd5a5692c502cd0283c94f2c670862bd9ef7
MD5 6742fa40f9af088d1fca94ae862b0fba
BLAKE2b-256 e048c4805b76d68508064ac2ff7a892ebe9ee26579b8e4a51c3ab5b215d42247

See more details on using hashes here.

Supported by

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