sirix-python-client
The home of the SirixDB python client
This package is currently in alpha stage.
The python client supports both sync and async programs.
The api docs can be found here. The api docs can also be built locally with the following:
cd docs
make html
Some example code:
from pysirix import sirix_sync, DBType, Insert
from httpx import Client
client = Client(base_url="http://localhost:9443")
sirix = sirix_sync("admin", "admin", client)
db = sirix.database("json-diff", DBType.JSON)
db.create()
resource = db.resource("json-resource")
resource.create(
{
"foo": ["bar", None, 2.33],
"bar": {"hello": "world", "helloo": True},
"baz": "hello",
"tada": [{"foo": "bar"}, {"baz": False}, "boo", {}, []],
}
)
resource.update(4, {"new": "stuff"}, insert=Insert.RIGHT)
Or with Async Support:
from pysirix import sirix_async, DBType, Insert
from httpx import AsyncClient
import asyncio
async def main():
client = AsyncClient(base_url="http://localhost:9443")
sirix = await sirix_async("admin", "admin", client)
db = sirix.database("json-diff", DBType.JSON)
await db.create()
resource = db.resource("json-resource")
await resource.create(
{
"foo": ["bar", None, 2.33],
"bar": {"hello": "world", "helloo": True},
"baz": "hello",
"tada": [{"foo": "bar"}, {"baz": False}, "boo", {}, []],
}
)
await resource.update(4, {"new": "stuff"}, insert=Insert.RIGHT)
loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.run(main()))
pysirix-shell
Installing
If you are not installing pysirix as part of a project, the preferred install method is to use pipx:
pipx install pysirix
Configuring
In your home directory, create a folder named pysirix-shell, and create a file named config.json in this folder. This file will hold the configuration for the shell. It should have the following form:
{
"localhost": {
"url": "http://localhost:9443",
"username": "admin",
"timeout": 4
},
"cloud": {
"url": "https://sirix-demo.com:9443",
"username": "administrator"
}
}
The timeout field is optional, and defaults to 5 (seconds).
Metadata
Release files for pysirix 0.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pysirix-0.5.3.tar.gz | 25.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pysirix-0.5.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.1 kB
Release files / pysirix-0.5.3.tar.gz
| Download URL | pysirix-0.5.3.tar.gz |
|---|---|
| Size | 25.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0eb5fed94b9598fc91e801b7b961647f14d738a8a8ea0da1cb59a1f77a0000e3
|
|
BLAKE2b-256 checksum How to use checksums |
89b46f490ce34eae0add367d7afbbe8a48c512e68dc26607354ac514469c027c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.6.1 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.7
|
Release files / pysirix-0.5.3-py3-none-any.whl
| Download URL | pysirix-0.5.3-py3-none-any.whl |
|---|---|
| Size | 29.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84a207aeffa852b9662d6e9d69883b3a0350723ba30e116de430b9c6744c9d39
|
|
BLAKE2b-256 checksum How to use checksums |
5630be0e7ff2f995602f53a8a783aae56072a4510b18b1aac7b54e3cfc2388af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.6.1 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.7
|
Security for pysirix 0.5.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.