You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the official Python SDK for Kern AI, your IDE for programmatic data enrichment and management.
7
8
8
9
## Installation
9
10
10
-
You can set up this library via either running `$ pip install kern-sdk`, or via cloning this repository and running `$ pip install -r requirements.txt` in your repository.
11
+
You can set up this library via either running `$ pip install kern-sdk`, or via cloning this repository and running `$ pip install -r requirements.txt` in this repository.
11
12
12
13
## Usage
13
14
Once you installed the package, you can access the application from any Python terminal as follows:
Alternatively, you can also set up a `secrets.json` file and load it via `Client.from_secrets_file`. If you use a `secrets.json`, you can also use the CLI commands directly (e.g. `kern pull`).
28
+
Alternatively, you can provide a `secrets.json` file in your repository, looking as follows:
29
+
```json
30
+
{
31
+
"user_name": "your-username",
32
+
"password": "your-password",
33
+
"project_id": "your-project-id"
34
+
}
35
+
```
36
+
Again, if you run on your local machine, you should provide also `"uri": "http://localhost:4455"`.
28
37
29
38
Now, you can easily fetch the data from your project:
30
39
```python
31
-
df = client.fetch_export()
40
+
df = client.get_record_export()
32
41
```
33
42
43
+
Alternatively, you can also just run `kern pull` in your CLI given that you have provided the `secrets.json` file.
44
+
34
45
The `df` contains data of the following scheme:
35
46
- all your record attributes are stored as columns, e.g. `headline` or `running_id` if you uploaded records like `{"headline": "some text", "running_id": 1234}`
36
47
- per labeling task three columns:
@@ -42,7 +53,8 @@ With the `client`, you easily integrate your data into any kind of system; may i
42
53
43
54
## Roadmap
44
55
-[ ] Register information sources via wrappers
45
-
-[ ] Fetch project statistics
56
+
-[ ] Add project upload
57
+
-[x] Fetch project statistics
46
58
47
59
48
60
If you want to have something added, feel free to open an [issue](https://github.com/code-kern-ai/kern-python/issues).
0 commit comments