morphik 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- morphik-0.1.0/.gitignore +39 -0
- morphik-0.1.0/PKG-INFO +47 -0
- morphik-0.1.0/README.md +34 -0
- morphik-0.1.0/morphik/__init__.py +15 -0
- morphik-0.1.0/morphik/async_.py +1416 -0
- morphik-0.1.0/morphik/exceptions.py +16 -0
- morphik-0.1.0/morphik/models.py +400 -0
- morphik-0.1.0/morphik/rules.py +47 -0
- morphik-0.1.0/morphik/sync.py +1447 -0
- morphik-0.1.0/pyproject.toml +28 -0
morphik-0.1.0/.gitignore
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Python-related files
|
2
|
+
*__pycache__/
|
3
|
+
*.pyc
|
4
|
+
*.pyo
|
5
|
+
*.pyd
|
6
|
+
.Python
|
7
|
+
env/
|
8
|
+
.env
|
9
|
+
venv/*
|
10
|
+
ENV/
|
11
|
+
dist/
|
12
|
+
build/
|
13
|
+
*.egg-info/
|
14
|
+
.eggs/
|
15
|
+
*.egg
|
16
|
+
*.pytest_cache/
|
17
|
+
|
18
|
+
core/tests/output
|
19
|
+
core/tests/assets
|
20
|
+
|
21
|
+
# Virtual environment
|
22
|
+
.venv/
|
23
|
+
.vscode/
|
24
|
+
|
25
|
+
*.DS_Store
|
26
|
+
|
27
|
+
storage/*
|
28
|
+
logs/*
|
29
|
+
samples/*
|
30
|
+
aggregated_code.txt
|
31
|
+
|
32
|
+
offload/*
|
33
|
+
test.pdf
|
34
|
+
|
35
|
+
experiments/*
|
36
|
+
ui-component/package-lock.json
|
37
|
+
|
38
|
+
|
39
|
+
ui-component/notebook-storage/notebooks.json
|
morphik-0.1.0/PKG-INFO
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: morphik
|
3
|
+
Version: 0.1.0
|
4
|
+
Summary: Morphik Python Client
|
5
|
+
Author-email: Morphik <founders@morphik.ai>
|
6
|
+
Requires-Python: >=3.8
|
7
|
+
Requires-Dist: httpx>=0.24.0
|
8
|
+
Requires-Dist: pillow==10.4.0
|
9
|
+
Requires-Dist: pydantic==2.10.3
|
10
|
+
Requires-Dist: pyjwt>=2.0.0
|
11
|
+
Requires-Dist: requests>=2.32.3
|
12
|
+
Description-Content-Type: text/markdown
|
13
|
+
|
14
|
+
# Morphik
|
15
|
+
|
16
|
+
A Python client for Morphik API that enables document ingestion and semantic search capabilities.
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
```bash
|
21
|
+
pip install morphik
|
22
|
+
```
|
23
|
+
|
24
|
+
```python
|
25
|
+
from morphik import Morphik
|
26
|
+
|
27
|
+
# Initialize client
|
28
|
+
db = Morphik("your-api-key")
|
29
|
+
|
30
|
+
# Ingest a document
|
31
|
+
doc_id = await db.ingest_document(
|
32
|
+
content="Your document content",
|
33
|
+
metadata={"title": "Example Document"}
|
34
|
+
)
|
35
|
+
|
36
|
+
# Query documents
|
37
|
+
results = await db.query(
|
38
|
+
query="Your search query",
|
39
|
+
filters={"title": "Example Document"}
|
40
|
+
)
|
41
|
+
|
42
|
+
# Process results
|
43
|
+
for result in results:
|
44
|
+
print(f"Content: {result.content}")
|
45
|
+
print(f"Score: {result.score}")
|
46
|
+
print(f"Metadata: {result.metadata}")
|
47
|
+
```
|
morphik-0.1.0/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# Morphik
|
2
|
+
|
3
|
+
A Python client for Morphik API that enables document ingestion and semantic search capabilities.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
```bash
|
8
|
+
pip install morphik
|
9
|
+
```
|
10
|
+
|
11
|
+
```python
|
12
|
+
from morphik import Morphik
|
13
|
+
|
14
|
+
# Initialize client
|
15
|
+
db = Morphik("your-api-key")
|
16
|
+
|
17
|
+
# Ingest a document
|
18
|
+
doc_id = await db.ingest_document(
|
19
|
+
content="Your document content",
|
20
|
+
metadata={"title": "Example Document"}
|
21
|
+
)
|
22
|
+
|
23
|
+
# Query documents
|
24
|
+
results = await db.query(
|
25
|
+
query="Your search query",
|
26
|
+
filters={"title": "Example Document"}
|
27
|
+
)
|
28
|
+
|
29
|
+
# Process results
|
30
|
+
for result in results:
|
31
|
+
print(f"Content: {result.content}")
|
32
|
+
print(f"Score: {result.score}")
|
33
|
+
print(f"Metadata: {result.metadata}")
|
34
|
+
```
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"""
|
2
|
+
Morphik Python SDK for document ingestion and querying.
|
3
|
+
"""
|
4
|
+
|
5
|
+
from .sync import Morphik
|
6
|
+
from .async_ import AsyncMorphik
|
7
|
+
from .models import Document
|
8
|
+
|
9
|
+
__all__ = [
|
10
|
+
"Morphik",
|
11
|
+
"AsyncMorphik",
|
12
|
+
"Document",
|
13
|
+
]
|
14
|
+
|
15
|
+
__version__ = "0.1.0"
|