A wrapper for interacting with Polygon DB
Project description
You can download it here https://pypi.org/project/polywrapper/
Welcome to the PolyWrapper wiki!
Here is the basics of using poly wrapper
To install polywrapper run the following command
pip install polywrapper
Here is an example of inserting data into a database
connection = polywrapper.PolyClient("node2.lunes.host:27106", "Better_Password", "ExampleDB")
res = connection.insert("Hello", "World")
print(res)
This will return {"Status": "Success"} if it works.`
You can also input sub level JSON and lists
connection.insert({"users": ["David", "Andrew"]})
connection.insert("meta", {"page": "2"})
To get data from certain key
print(res)
to get all data from database do
res = connection.get()
if the key value system is {"key": "value"} it will return value if it is something like {"key": {"sub": "json"}} it will return {"sub": "json"}
To update a keys value.
connection.update("key", "value2")
once again this can be json or a string
to append data to a list you will need to do
res = connection.insert("users", ["John", "Andrew"]) connection.append("users", "Mia")
To remove certain keys.
connection.remove('key')
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
File details
Details for the file polywrapper-0.1.5.tar.gz
.
File metadata
- Download URL: polywrapper-0.1.5.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c32c0fe024e3502b82b89b791f3f50d069ef617037d2199014006742d9e08f0f |
|
MD5 | 817763599ac550370e091290b652ffef |
|
BLAKE2b-256 | 95011eb829bbf81e2c180f7e2581f94e8a715c490cd8febc19fc78d93d4a9d64 |