The official Python client library for Mindleap Starter
Project description
Mindleap Starter Python Client
This is the official Python client library for Mindleap Starter.
Read the full documentation here
Mindleap is a knowledge graph system that allows you to ingest, transform, explore and analyze:
- any type of structured or unstructured data
- from laptop to planet scale
Mindleap Starter is a limited version, for smaller scale knowledge graphs.
Mindleap Starter is free for non-commercial use, making it the ideal alternative to introduce yourself to the world of knowledge graphs.
As you progress into commercial use, Mindleap Starter requires a paid license.
You can use this Python library in conjunction with the Mindleap Starter Web Application to interact with the Mindleap Starter system.
Want to integrate Mindleap in your organization?
Start small:
- Download Mindleap Starter for non-commercial use
- Use this Python library in Jupyter Notebook or in your own application code
Integrate knowledge graphs in your business applications:
- Acquire a paid license for Mindleap Starter
- Use this Python library in your own application code
Integrate knowledge graphs in your organization:
- Acquire the enterprise version of Mindleap
- Use an orchestration framework, such as Apache NiFi or Camunda, to perform tasks in Mindleap via client libraries (Python/Java) or the Mindleap REST API
Development
-
Install the mindleap-starter-python-client package:
pip install mindleap-starter-python-client
-
Set up your local environment:
-
Create a file named
.envin the project root. -
Fill in the Mindleap Starter host url (adjust the port, if necessary)
MINDLEAP_STARTER_HOST_URL=http://localhost:8090
Happy coding!
Example
-
Create a simple graph model, using a fluent builder pattern:
from mindleap_starter_python_client.graph_model_service import * from mindleap_starter_python_client.services import ResponseStatus graph_model_service: GraphModelService = GraphModelService() _SIMPLE_MODEL_ID: UUID = UUID("00000000-0000-0000-0000-000000000001") _SIMPLE_MODEL_NAME: str = "Simple Model" def test_store_simple_graph_model() -> None: graph_model: GraphModel = ( GraphModel() .with_id(_SIMPLE_MODEL_ID) .with_name(_SIMPLE_MODEL_NAME) .add_entity_model( EntityModel() .with_type_name("person") .with_type_label("Person") .with_icon_type(IconType.Person) .add_property_model( PropertyModel() .with_type_name("name") .with_type_label("Name") .with_value_type(PropertyValueType.String) ) .with_labelling_property_types(["name"]) ) ) response: GraphModelResponse = graph_model_service.store_graph_model(graph_model) assert response.status == ResponseStatus.SUCCESS
-
Create an exploration, using the above graph model:
from mindleap_starter_python_client.exploration_service import * from mindleap_starter_python_client.graph_model_service import GraphModelService from mindleap_starter_python_client.services import ResponseStatus graph_model_service: GraphModelService = GraphModelService() exploration_service: ExplorationService = ExplorationService() _EXPLORATION_1_ID: UUID = UUID("00000000-0000-0000-0000-000000000001") _EXPLORATION_1_NAME: str = "Exploration 1" _SIMPLE_MODEL_ID: UUID = UUID("00000000-0000-0000-0000-000000000001") def test_store_exploration() -> None: graph_model: GraphModel = graph_model_service.get_graph_model_by_id(_SIMPLE_MODEL_ID) exploration: Exploration = ( Exploration() .with_id(_EXPLORATION_1_ID) .with_name(_EXPLORATION_1_NAME) .with_graph_model(graph_model) .add_entity( Entity() .with_entity_type("person") .add_property( Property() .with_property_type("name") .with_property_value(StringPropertyValue("James")) ) ) ) response: GenericResponse = exploration_service.store_exploration(exploration) assert response.status == ResponseStatus.SUCCESS
Contribution
If you're interested in contributing code to this project, check out the contribution guidelines.
License
The Mindleap Starter Python Client library is open source under the MIT License.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mindleap_starter_python_client-1.0.6-py3-none-any.whl.
File metadata
- Download URL: mindleap_starter_python_client-1.0.6-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
385945841072bfa7faa2a5e607d70432b56e3c55c8b7ff36330d6c10f9ebd91c
|
|
| MD5 |
fa93794f9463d8a3e20cb85c75a4ab8a
|
|
| BLAKE2b-256 |
b2a7b7af150eb50754d832c766b2f13ad883f3a8f91e6c38e092a4ee91e24858
|