https://github.com/izihawa/tantipy
https://github.com/izihawa/tantipy
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/izihawa/tantipy
- Owner: izihawa
- License: mit
- Created: 2020-10-21T18:54:27.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-06T20:38:37.000Z (almost 5 years ago)
- Last Synced: 2025-06-14T22:17:54.119Z (4 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tantipy
Tantipy is a pure python tool for reading Tantivy `.store` files.
## Example
```python
import json
import osfrom tantipy import TantivyReader
index_path = '...'
with open(os.path.join(index_path, 'meta.json')) as schema_file:
schema = json.load(schema_file)['schema']with open(os.path.join(index_path, '687e95d2e6f54a3cb1008e69ebbebdd9.store')) as store_file:
content = store_file.read()
tantivy_reader = TantivyReader(content, schema)
for document in tantivy_reader.documents():
print(document)
```