KGOps — End-to-End Knowledge Graph Builder
A Python framework for building, maintaining, and sharing knowledge graphs, with a local in-memory backend and CLI/Python API. Features like LLM-assisted extraction and multi-tenant support are planned for future releases.
Features
- Local NetworkX backend (in-memory)
- CLI and Python API
- Resource management (create, query, update)
- JSON import/export
- Query system for traversal and filtering
- Typed, tested, production-ready code
Planned Features
- Neo4j integration
- LLM extraction
- Embeddings
- KG Store
- Multi-tenancy
Quick Start
Installation
pip install kgops
Initialize a project
kgops init
Basic Python usage
from kgops import KGOps, Resource
# Initialize
kg = KGOps(backend="networkx")
# Create graph
graph = kg.create_graph("my-knowledge-graph")
# Add entities
person = Resource(
labels={"Person"},
properties={"name": "Alice Johnson", "role": "Data Scientist"}
)
company = Resource(
labels={"Organization"},
properties={"name": "TechCorp", "industry": "AI"}
)
kg.add_resource(person)
kg.add_resource(company)
# Add relationship
kg.add_edge(person, company, "WORKS_AT")
# Query
neighbors = kg.query("neighbors", resource_id=person.id)
print(f"Alice is connected to {len(neighbors)} entities")
# Export
kg.save_graph("my-graph.json")
CLI examples
# Create new graph
kgops create --name "my-graph" --description "My first KG"
# Query neighbors for a resource
kgops query neighbors --resource-id <RESOURCE_ID>
Architecture
kgops/
├── core/ # core data models and logic
├── storage/ # backend implementations (NetworkX, Neo4j)
├── connector/ # data ingestion (CSV, JSON, APIs)
├── transform/ # processing and extraction
├── utils/ # utilities and helpers
└── cli/ # command line interface
├── storage/ # backend implementations (NetworkX, Neo4j) ├── connectors/ # data ingestion (CSV, JSON, APIs) ├── transforms/ # processing and extraction ├── utils/ # utilities and helpers └── cli/ # command line interface
## API Reference (high level)
- KGOps — main interface for graph operations
- Resource — graph node/entity (labels + properties)
- Dataset — collection of resources and relationships
- Edge — relationship between two resources
- MemoryStorage — NetworkX-based in-memory backend
- BaseStorage — abstract base for custom backends
## Development
### Setup
```bash
git clone https://github.com/SohamChaudhari2004/kgops
cd kgops
pip install -e ".[dev]"
Run tests and linters
pytest tests/
black kgops/
isort kgops/
flake8 kgops/
mypy kgops/
Roadmap
- Phase 1: Core Package MVP (NetworkX, CLI, Python API) ✅
- Phase 2: Neo4j Integration + LLM Extraction
- Phase 3: KG Store (Private Alpha)
- Phase 4: Multi-tenancy + Streaming
- Phase 5: Public Release + Governance
Contributing
Contributions welcome. See CONTRIBUTING.md for guidelines.
License
MIT — see LICENSE for details.
Support
- Docs: https://kgops.readthedocs.io
- Issues: https://github.com/SohamChaudhari2004/kgops/issues
- Discussions: https://github.com/SohamChaudhari2004/kgops/discussions
Metadata
Release files for kgops 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kgops-0.1.2.tar.gz | 50.1 kB | Without provenance | Details for kgops-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kgops-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for kgops-0.1.2-py3-none-any.whl |
Total release size: 100.4 kB
Release files / kgops-0.1.2.tar.gz
| Download URL | kgops-0.1.2.tar.gz |
|---|---|
| Size | 50.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31c3340b3d974cacc5ebd1104613d3fbf517f26439455e9c1e5d451f88f80faf
|
|
BLAKE2b-256 checksum How to use checksums |
667c05cc6e24fa260af8e36c0c88cb182784ac525b94e498241485b9a4d83b84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Release files / kgops-0.1.2-py3-none-any.whl
| Download URL | kgops-0.1.2-py3-none-any.whl |
|---|---|
| Size | 50.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dcfa2fa9728efb2c040db459149c32d41d7e7fb1cc56fc9011fdc50ef294940c
|
|
BLAKE2b-256 checksum How to use checksums |
1b8046997a818305ed7346ac08e0a31eef922dfae3a28dbbe8ae7ae290e41320
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Security for kgops 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.