Metadata-Version: 2.1
Name: realitydb
Version: 0.0.2
Summary: RPC, WebSocket Server, JSON RPC 2.0, OpenAPI, Swagger UI
Home-page: https://perudevlabs.com
License: MIT
Keywords: RPC,WebSocket,FastAPI,OpenAPI,Swagger,JSON-RPC
Author: Oscar Bahamonde
Author-email: oscar@perudevlabs.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: cachetools (>=5.5.0,<6.0.0)
Requires-Dist: cbase64 (>=0.0.9,<0.0.10)
Requires-Dist: click (>=8.1.7,<9.0.0)
Requires-Dist: faiss-cpu (>=1.9.0,<2.0.0)
Requires-Dist: fastapi[all] (>=0.115.2,<0.116.0)
Requires-Dist: openpyxl (>=3.1.5,<4.0.0)
Requires-Dist: orjson (>=3.10.7,<4.0.0)
Requires-Dist: pydantic (>=2.9.2,<3.0.0)
Requires-Dist: pymupdf (>=1.24.11,<2.0.0)
Requires-Dist: pypdf2 (>=3.0.1,<4.0.0)
Requires-Dist: python-docx (>=1.1.2,<2.0.0)
Requires-Dist: python-pptx (>=1.0.2,<2.0.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Requires-Dist: rocksdict (>=0.3.23,<0.4.0)
Requires-Dist: sentence-transformers (>=3.2.0,<4.0.0)
Requires-Dist: uvicorn[standard] (>=0.31.1,<0.32.0)
Project-URL: Documentation, https://realitydb-docs.perudevlabs.com
Project-URL: Repository, https://github.com/perudevlabs/realitydb
Description-Content-Type: text/markdown

# RealityDB

![Cover](images/landscape.jpeg)

RealityDB is a document-oriented database built on top of `rocksdb`, enhanced by Python extensions such as `base64c`, `orjson`, and `rocksdict` for performance-critical operations. It leverages `pydantic` and `OpenAPI` specifications for seamless data management. By accepting a single `OpenAPI` specification, RealityDB can generate the corresponding Python classes and methods for data handling.

Inspired by AWS DynamoDB, RealityDB includes methods like `CreateTable`, `DeleteTable`, `GetItem`, `PutItem`, `DeleteItem`, `Scan`, `Query`, `BatchGetItem`, `BatchWriteItem`, and `UpdateItem` for efficient data storage and retrieval. It offers real-time capabilities using WebSockets for full-duplex communication.

Primarily intended for media-intensive applications—such as images, audio, video, 3D models, and other binary data—RealityDB meets real-time requirements through its optimized `base64c` and `orjson` extensions.

## Features

- [x] **DynamoDB API Compatibility**
  - Implements methods similar to AWS DynamoDB for seamless integration and data operations.
- [x] **Real-time Communication**
  - Utilizes WebSockets for full-duplex communication, enabling real-time data updates and notifications.
- [x] **OpenAPI Specification Migration**
  - Generates Python classes and methods from a single OpenAPI specification for streamlined data management.
- [ ] **OAuth2 Authentication**
  - Implements OAuth2 protocol for secure authentication and authorization.
- [ ] **Indexing of KeySchema Attributes**
  - Supports indexing of key schema attributes for faster and more efficient queries.
- [ ] **Publish/Subscribe Support**
  - Introduces a Pub/Sub model for real-time data changes and event notifications.
- [ ] **Global Distribution @Edge**
  - Enables global distribution and edge computing capabilities for low-latency access worldwide.
- [ ] **Zstd Compression**
  - Integrates Zstandard (zstd) compression for efficient data storage and transfer.
- [ ] **S3FS Integration with Edge Computing**
  - Integrates with S3FS to provide distributed file system capabilities in edge environments.
- [ ] **Authentication and Multi-tenancy**
  - Supports multi-tenant architectures with robust authentication mechanisms for data isolation and security.

## Installation

Install RealityDB using pip:

```bash
pip install realitydb
```

## Usage

Use your own OpenAPI specification to generate the corresponding Python classes and methods for data handling.

```bash
realitydb ./openapi.json
```

You will see the RPCServer running on `ws://localhost:8888` and the RPCClient ready to use.





