Skip to main content

The official Python driver for the Curiosity Search engine (https://curiosity.ai/).

Project description

The official Python driver for Curiosity (https://curiosity.ai/).

The Python driver makes it easy to:

  • upload files to your workspace
  • add nodes and relationships to the graph
  • create users, teams and manage access
  • run queries against 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 documentation on how to create an API token.
  • connector_name : A descriptive name for your Connector.

You can use the methods on the graph object to interact with your Curiosity Workspace. Check out the API documentation to see examples on how to write a data connector.

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()

Project details


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

If you're not sure about the file name format, learn more about wheel file names.

curiosity-65767-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file curiosity-65767-py3-none-any.whl.

File metadata

  • Download URL: curiosity-65767-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for curiosity-65767-py3-none-any.whl
Algorithm Hash digest
SHA256 defd35e5f11b5d31c12c18d67cfd3b2beb2bc44ee16cb1431a30ff86b4b070b7
MD5 626199f22790be4c861e141383724778
BLAKE2b-256 de66cf42fffdb5bb35e60b8601413655f862ec1bf8d93305d53df9b061a96470

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page