Skip to content

Commit 80e9149

Browse files
committed
README.md
1 parent 40cfba9 commit 80e9149

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# CluedIn IPython magic commands
2+
3+
This module provides IPython [magic](https://ipython.readthedocs.io/en/stable/interactive/python-ipython-diff.html#magics) commands for interacting with the CluedIn API.
4+
5+
```python
6+
# Install the package.
7+
%pip install cluedin-magic
8+
```
9+
10+
```python
11+
# Load the extension.
12+
%load_ext cluedin_magic
13+
```
14+
15+
```python
16+
# Create a new CluedIn context from a JWT token.
17+
api_token = '<your_token_here>'
18+
ctx = %cluedin get-context --jwt %api_token
19+
```
20+
21+
```python
22+
# Find all entities with a specific entityType.
23+
%cluedin search --context ctx --query +entityType:/Infrastructure/User
24+
```
25+
26+
```python
27+
# Find all entities with a specific entityType and limit the results.
28+
%cluedin search --context ctx --query +entityType:/Infrastructure/User --limit 10
29+
```
30+
31+
```python
32+
# Complex query with multiple properties and limit the results.
33+
%cluedin search --context ctx --query +entityType:/IMDb/Name -properties.imdb.name.deathYear:"\\\\N" --limit 10
34+
```
35+
36+
```python
37+
# Save the results of a query to a pandas DataFrame.
38+
pd = %cluedin search --context ctx --query +entityType:/IMDb/Name +properties.imdb.name.birthYear:1981
39+
```

0 commit comments

Comments
 (0)