The official Python driver for the Curiosity Search engine (https://curiosity.ai/).
Project description
The official Python driver for the Curiosity Search engine (https://curiosity.ai/).
The Python driver makes it easy to:
- upload files, add entities and link tehm
- create users, teams and manage access
- run queries on the graph
Installation
Run pip install curiosity
to install the Python driver from PyPI.
Getting Started
Replace the server
, and connector_name
in the code sample below.
server
: The full url to your Curiosity system. The used port is printed in the beginning of the log output of the Curiosity instance. The url has to end with/api
.lib_token
: You have to create a library token first, in order to use this library with your Curiosity instance. See the python documentation page on how to create a library token.connector_name
: A descriptive name for your Connector. This is how the connector shows up in the Manage Data overview.
Now, you can use the methods on the graph
object to interact with the Curiosty system. Check out the API documentation to see all the possible methods.
from curiosity import Graph
def main():
# The url to you curiosity instance
server = "http://localhost:8080/api"
# The library token you just created
lib_token = "eqJHbGci..."
# A descriptive name for your Connector. This is how the connector shows up in the Manage Data overview.
connector_name = "Python data connector"
with Graph.connect(server, lib_token, connector_name) as graph:
# The graph objects provides plenty of methods to interact with your
# Curiosity instance. A file can be uploaded like this:
fullpath = "./sample.pdf"
filename = "sample.pdf"
source = "Samples"
graph.upload_file_by_path(fullpath, filename, source)
if __name__ == '__main__':
main()
API docuemtnation
Coming soon ...
Example projects
Comming soon ...
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
curiosity-14882-py3-none-any.whl
(19.8 kB
view details)
File details
Details for the file curiosity-14882-py3-none-any.whl
.
File metadata
- Download URL: curiosity-14882-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cef337047fe50b0379f2f48629caf71e0d6a2ec932ed0649f39263d1199d46c1 |
|
MD5 | 65ceae2c98d48da7177e76381b9e993e |
|
BLAKE2b-256 | 24fff80abd7cc0714d8519ffadf7cef682977766da20b5c617a0b0027bea678a |