curiosity-36441
توضیحات
The official Python driver for the Curiosity Search engine (https://curiosity.ai/).
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | curiosity-36441 |
| نام | curiosity |
| نسخه کتابخانه | 36441 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | curiosity.ai |
| ایمیل نویسنده | hello@curiosity.ai |
| آدرس صفحه اصلی | http://curiosity.ai |
| آدرس اینترنتی | https://pypi.org/project/curiosity/ |
| مجوز | - |
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](https://pypi.org/project/curiosity/).
# 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](https://dev.curiosity.ai/data-sources/api-integrations/api-tokens) 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](https://dev.curiosity.ai/data-sources/api-integrations) to see examples on how to write a data connector.
```python
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()
```
نیازمندی
| مقدار | نام |
|---|---|
| >=2.25.0 | requests |
| >=1.26.2 | urllib3 |
نحوه نصب
نصب پکیج whl curiosity-36441:
pip install curiosity-36441.whl
نصب پکیج tar.gz curiosity-36441:
pip install curiosity-36441.tar.gz