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 Distribution
Built Distribution
Close
Hashes for jsonexussync-client-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebb9abeb86d6e773f92ef34ebc6767b3cae53eaf928865e7cf05a80a93d9c1c7 |
|
MD5 | 6db7d0362f3626431d37e056c5670998 |
|
BLAKE2b-256 | ca75538e8dd4f0d6138494164ae0f397d9c2cc429957e22c1f028c5bbbb34959 |
Close
Hashes for jsonexussync_client-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72380c120495aa69ceb6e937bf77f3317ca934782f01cc2be390e3b096d67e46 |
|
MD5 | 3d8267be9f04d138ef19d83b0a8471f1 |
|
BLAKE2b-256 | 297398c7d0ad5c2732b03ea5ca4df32cb922a73a123ff1a7dc0d57bf8fb6de7d |