Metadata-Version: 2.4
Name: fieldz_kb
Version: 0.2.1
Summary: A library store dataclass-like objects into knowledge bases
Project-URL: Homepage, https://github.com/adrienrougny/fieldz_kb
Project-URL: Issues, https://github.com/adrienrougny/fieldz_kb/issues
Author-email: Adrien Rougny <adrienrougny@gmail.com>
License: GPL-3.0-or-later
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: fieldz>=0.1.2
Requires-Dist: inflect>=7.5.0
Provides-Extra: all
Requires-Dist: clorm>=1.6.1; extra == 'all'
Requires-Dist: pylpg>=0.2.1; extra == 'all'
Requires-Dist: pylpg[falkordb]>=0.2.1; extra == 'all'
Requires-Dist: pylpg[falkordblite]>=0.2.1; extra == 'all'
Requires-Dist: pylpg[neo4j]>=0.2.1; extra == 'all'
Requires-Dist: pyyaml>=6.0; extra == 'all'
Provides-Extra: biocypher
Requires-Dist: pylpg>=0.2.1; extra == 'biocypher'
Requires-Dist: pyyaml>=6.0; extra == 'biocypher'
Provides-Extra: clingo
Requires-Dist: clorm>=1.6.1; extra == 'clingo'
Provides-Extra: falkordb
Requires-Dist: pylpg[falkordb]>=0.2.1; extra == 'falkordb'
Provides-Extra: falkordblite
Requires-Dist: pylpg[falkordblite]>=0.2.1; extra == 'falkordblite'
Provides-Extra: neo4j
Requires-Dist: pylpg[neo4j]>=0.2.1; extra == 'neo4j'
Description-Content-Type: text/markdown

# fieldz_kb

A library to store dataclass-like objects into knowledge bases.

## Features

- **Multiple backends** — Neo4j, FalkorDB, FalkorDBLite (embedded), clingo/ASP
- **Automatic type conversion** — primitives, collections, enums, nested dataclasses
- **Plugin-based extensibility** — add support for custom types
- **BioCypher integration** — generate BioCypher-compatible nodes, relationships, and YAML schemas

## Installation

```bash
pip install fieldz-kb[neo4j]        # Neo4j support
pip install fieldz-kb[falkordb]     # FalkorDB support
pip install fieldz-kb[falkordblite] # FalkorDBLite (embedded) support
pip install fieldz-kb[clingo]       # Clingo/ASP support
pip install fieldz-kb[biocypher]    # BioCypher adapter
pip install fieldz-kb[all]          # Everything
```

## Quick example

```python
import dataclasses
import fieldz_kb.lpg.session
import fieldz_kb.lpg.backends.neo4j

@dataclasses.dataclass
class Gene:
    name: str
    chromosome: int

backend = fieldz_kb.lpg.backends.neo4j.Neo4jBackend(
    hostname="localhost",
    username="neo4j",
    password="password",
)

with fieldz_kb.lpg.session.Session(backend) as session:
    session.save_from_object(Gene(name="TP53", chromosome=17))

    results = session.execute_query_as_objects(
        "MATCH (n:Gene) RETURN n"
    )
```

## Documentation

Full documentation is available at [https://adrienrougny.github.io/fieldz_kb/](https://adrienrougny.github.io/fieldz_kb/).

## License

GPLv3. See [LICENSE](LICENSE) for details.
