https://github.com/romaklimenko/cluedin-magic
IPython magic for CluedIn
https://github.com/romaklimenko/cluedin-magic
Last synced: about 2 months ago
JSON representation
IPython magic for CluedIn
- Host: GitHub
- URL: https://github.com/romaklimenko/cluedin-magic
- Owner: romaklimenko
- License: mit
- Created: 2024-08-20T18:58:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-27T15:42:23.000Z (almost 2 years ago)
- Last Synced: 2025-01-14T21:11:03.556Z (over 1 year ago)
- Language: Jupyter Notebook
- Size: 41 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CluedIn IPython magic commands
This module provides IPython [magic](https://ipython.readthedocs.io/en/stable/interactive/python-ipython-diff.html#magics) commands for interacting with the CluedIn API.
```python
# Install the package.
%pip install cluedin-magic
```
```python
# Load the extension.
%load_ext cluedin_magic
```
```python
# Create a new CluedIn context from a JWT token.
api_token = ''
ctx = %cluedin get-context --jwt %api_token
```
```python
# Find all entities with a specific entityType.
%cluedin search --context ctx --query +entityType:/Infrastructure/User
```
```python
# Find all entities with a specific entityType and limit the results.
%cluedin search --context ctx --query +entityType:/Infrastructure/User --limit 10
```
```python
# Complex query with multiple properties and limit the results.
%cluedin search --context ctx --query +entityType:/IMDb/Name -properties.imdb.name.deathYear:"\\\\N" --limit 10
```
```python
# Save the results of a query to a pandas DataFrame.
pd = %cluedin search --context ctx --query +entityType:/IMDb/Name +properties.imdb.name.birthYear:1981
```