Catalog PyPI
PACKAGE EXPLORERView in registry

abstract-framehub-client

PyPI

Client Python for AbstractFrameHub Server

Versions collected1
Direct dependencies2From release 0.1.6
Last observed20 Oct, 17:40 UTC

README

Version 0.1.6 documentation

Abstract Frame Hub Client

AbstractFrameHubClient is a Python client for interacting with AbstractFrameHub, a secure, schema-aware, and cloud-ready data layer inspired by MongoDB. It supports document validation, user and permission management, and future AI-enhanced data features.


📦 Installation

Install via PyPI:

pip install abstract-framehub-client

Or install from source:

git clone https://gitlab.com/stackngo-client/abstractframehub-client-python.git
cd abstractframehub-client-python
pip install .

Abstract Frame Hub Server :

git clone https://gitlab.com/stackngo-client/abstractframehub-helm.git
cd docker-compose
docker-compose up -d

🚀 Quick Start

from abstract-framehub-client import AbstractFrameHubClient

# Connect and authenticate
client = AbstractFrameHubClient()
client.login("root", "afh-password")

# Select a database and collection
db = client.database("mydb")
try:
    db.create()
except AlreadyExistsException as e:
    pass
collection = db.collection("mycollection")

# Insert a document
collection.insert_one({"title": "Hello, FrameHub!", "likes": 0})

# Query documents
results = collection.find({"likes": {"$gte": 0}})
print(results)

🔐 Authentication

client.login("root", "afh-password")

Stores a session token used automatically in future requests.


🗃️ Database & Collection API

db = client.database("blog")
db.create()
db.drop()

collection = db.collection("posts")
collection.insert_one({...})
collection.find_one({"key": "value"})
collection.delete_many({})

📐 Schema Support

Define and enforce JSON schemas per collection:

collection.schema({
    "bsonType": "object",
    "required": ["title", "content"],
    "properties": {
        "title": {"bsonType": "string"},
        "content": {"bsonType": "string"}
    },
    "additionalProperties": False
})

👤 User Management

client.add_user({
    "username": "admin",
    "password": "securepass",
    "permissions": {"blog": "*"}
})
client.drop_user("admin")

❗ Error Handling

All errors raise custom exceptions:

  • NotAuthenticatedException
  • ValidationException
  • AlreadyExistsException
  • AfhException (generic)

🧪 Testing Example

def test_insert_and_find():
    client = AbstractFrameHubClient()
    client.login("admin", "123456")
    db = client.database("testdb")
    coll = db.collection("items")
    doc_id = coll.insert_one({"name": "test item"})
    result = coll.find_one({"_id": doc_id})
    assert result["name"] == "test item"

📁 Project Structure

├── abstract_framehub_client
│   ├── __init__.py
│   ├── client.py
│   ├── exceptions.py
│   └── wrappers
│       ├── __init__.py
│       ├── collection.py
│       └── database.py

📝 License

This project is licensed under the MIT License.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.625 May 20252

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

ACCESSIBLE
stackngo-client/abstractframehub-client-python

Shared repository data · GitLab

License detected in repository
Not collected
Contributor identities
2 · complete API traversal
Contributors · showing 2 of 2 collected
ContributorContributions
Théo Mottet15
Stackngo2

Default-branch author identities; GitLab commit counts exclude merge commits.

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

2identities
Gauge · observed snapshots23 Oct 2026
210
2026-10-20: 2 · observed 2026-10-20T18:16:09.1047504Z2026-10-21: 2 · observed 2026-10-21T18:16:31.0650150Z2026-10-22: 2 · observed 2026-10-22T18:17:09.4610814Z2026-10-23: 2 · observed 2026-10-23T18:18:07.3453618Z
20 Oct23 Oct

gitlab · 4 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2322026-10-23T18:18:07.3453618Z
2026-10-2222026-10-22T18:17:09.4610814Z
2026-10-2122026-10-21T18:16:31.0650150Z
2026-10-2022026-10-20T18:16:09.1047504Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:40 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:71b8a367abc1d9626f66693d7147ad704ad596c18af3c209c465adafa7536a68