client library of client JSONexusSync
Project description
JSONexusSync Python Client Documentation
Introduction
The JSONexusSync Python client library provides an easy-to-use interface for interacting with JSONexusSync remote database system using WebSockets.
Installation
You can install the JSONexusSync Python client library using pip:
pip install jsonexussync-client
Usage
Here's an example of how to use the JSONexusSync Python client library:
import asyncio
import json
from jsonexussync_client import JSONexusSyncClient
async def main():
config = config = {
"api_key":"YourApiKey",
"server_uri": "ws://localhost:8765"
}
client = JSONexusSyncClient(config)
# Insert a new item into the 'users' collection
await client.insert_data('users', {'name': 'Charlie', 'age': 35, 'email': 'charlie@example.com'})
# Find users with a specific query
result = await client.find_data('users', {'age': {'_op': '$eq', '_value': 35}})
print(result)
# Delete users with a specific query
await client.delete_data('users', {'name': {'_op': '$eq', '_value': "Melissa Villarreal"}})
# Update users with a specific query
result = await client.update_data('users', {"age": {'_op': '$eq', '_value': 23}}, {"job": "Ethical Hacker"})
# Creating a new database
result = await client.create_db('txns')
# Generate an API key
result = await client.generate_api_key('adminr', 'db')
# Creating a new database
result = await client.create_db('companys')
#result = await client.get_dbs()
#result = await client.create_collection("students")
print(result)
if __name__ == "__main__":
asyncio.run(main())
Conclusion
The JSONexusSync Python client library simplifies interaction with JSONexusSync remote database system, allowing developers to easily integrate real-time data synchronization into their Python applications.
For more information and detailed documentation, please visit the JSONexusSync Documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for jsonexussync_client-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ae77880339862ac26586433941cab9274d767caa7dd23f81db900e6f2da5a63 |
|
MD5 | 1214ed0d5ff7c6d91afae23284be8ee5 |
|
BLAKE2b-256 | b4499b6f32a53b3ab97b8d19d1e4793ef5987e972102e34ef7b460ea55dd8ab7 |