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.1.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.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for deepjson_py_connector-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f3beb8ae4da11764337666147d27a11de37aeaf7e35c040720e49e78cd61344b
MD5 e80b2703ccde2f52205492c237aa51ed
BLAKE2b-256 1c4a3aa3dd0c1dd3db8e8427521b8504ac34618ff6f15e7ad88ee01ae3aa0f2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for deepjson_py_connector-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d0c07a8f2a07e74fb4b1ade5bb534a6480a9758208164e6b44d416345f71a7d7
MD5 368c93490876da7740da0bb25d833c2c
BLAKE2b-256 14efc34df8e3a0fcb8a4d3e561c0e51cd543131aa7af4cb2efe527cefe0d9e44

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