# 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
```bash
pip install kgops
```
### Initialize a project
```bash
kgops init
```
### Basic Python usage
```python
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
```bash
# 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
```bash
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](CONTRIBUTING.md) for guidelines.
## License
MIT — see [LICENSE](LICENSE) for details.
## Support
- Docs: https://kgops.readthedocs.io
- Issues: https://github.com/SohamChaudhari2004/kgops/issues
- Discussions: https://github.com/SohamChaudhari2004/kgops/discussions
---
Raw data
{
"_id": null,
"home_page": "https://github.com/SohamChaudhari2004/kgops",
"name": "kgops",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "knowledge-graph, rag, nlp, ai, machine-learning",
"author": "KGOps Team",
"author_email": "Soham Chaudhari <sohamchaudhari2004@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/66/7c/05cc6e24fa260af8e36c0c88cb182784ac525b94e498241485b9a4d83b84/kgops-0.1.2.tar.gz",
"platform": null,
"description": "# KGOps \u2014 End-to-End Knowledge Graph Builder\r\n\r\nA 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.\r\n\r\n## Features\r\n\r\n- Local NetworkX backend (in-memory)\r\n- CLI and Python API\r\n- Resource management (create, query, update)\r\n- JSON import/export\r\n- Query system for traversal and filtering\r\n- Typed, tested, production-ready code\r\n\r\n## Planned Features\r\n\r\n- Neo4j integration\r\n- LLM extraction\r\n- Embeddings\r\n- KG Store\r\n- Multi-tenancy\r\n\r\n## Quick Start\r\n\r\n### Installation\r\n\r\n```bash\r\npip install kgops\r\n```\r\n\r\n### Initialize a project\r\n\r\n```bash\r\nkgops init\r\n```\r\n\r\n### Basic Python usage\r\n\r\n```python\r\nfrom kgops import KGOps, Resource\r\n\r\n# Initialize\r\nkg = KGOps(backend=\"networkx\")\r\n\r\n# Create graph\r\ngraph = kg.create_graph(\"my-knowledge-graph\")\r\n\r\n# Add entities\r\nperson = Resource(\r\n labels={\"Person\"},\r\n properties={\"name\": \"Alice Johnson\", \"role\": \"Data Scientist\"}\r\n)\r\n\r\ncompany = Resource(\r\n labels={\"Organization\"},\r\n properties={\"name\": \"TechCorp\", \"industry\": \"AI\"}\r\n)\r\n\r\nkg.add_resource(person)\r\nkg.add_resource(company)\r\n\r\n# Add relationship\r\nkg.add_edge(person, company, \"WORKS_AT\")\r\n\r\n# Query\r\nneighbors = kg.query(\"neighbors\", resource_id=person.id)\r\nprint(f\"Alice is connected to {len(neighbors)} entities\")\r\n\r\n# Export\r\nkg.save_graph(\"my-graph.json\")\r\n```\r\n\r\n### CLI examples\r\n\r\n```bash\r\n# Create new graph\r\nkgops create --name \"my-graph\" --description \"My first KG\"\r\n\r\n# Query neighbors for a resource\r\nkgops query neighbors --resource-id <RESOURCE_ID>\r\n```\r\n\r\n## Architecture\r\n\r\n```\r\nkgops/\r\n\u251c\u2500\u2500 core/ # core data models and logic\r\n\u251c\u2500\u2500 storage/ # backend implementations (NetworkX, Neo4j)\r\n\u251c\u2500\u2500 connector/ # data ingestion (CSV, JSON, APIs)\r\n\u251c\u2500\u2500 transform/ # processing and extraction\r\n\u251c\u2500\u2500 utils/ # utilities and helpers\r\n\u2514\u2500\u2500 cli/ # command line interface\r\n```\r\n\r\n\u251c\u2500\u2500 storage/ # backend implementations (NetworkX, Neo4j)\r\n\u251c\u2500\u2500 connectors/ # data ingestion (CSV, JSON, APIs)\r\n\u251c\u2500\u2500 transforms/ # processing and extraction\r\n\u251c\u2500\u2500 utils/ # utilities and helpers\r\n\u2514\u2500\u2500 cli/ # command line interface\r\n\r\n````\r\n\r\n## API Reference (high level)\r\n\r\n- KGOps \u2014 main interface for graph operations\r\n- Resource \u2014 graph node/entity (labels + properties)\r\n- Dataset \u2014 collection of resources and relationships\r\n- Edge \u2014 relationship between two resources\r\n- MemoryStorage \u2014 NetworkX-based in-memory backend\r\n- BaseStorage \u2014 abstract base for custom backends\r\n\r\n## Development\r\n\r\n### Setup\r\n```bash\r\ngit clone https://github.com/SohamChaudhari2004/kgops\r\ncd kgops\r\npip install -e \".[dev]\"\r\n````\r\n\r\n### Run tests and linters\r\n\r\n```bash\r\npytest tests/\r\nblack kgops/\r\nisort kgops/\r\nflake8 kgops/\r\nmypy kgops/\r\n```\r\n\r\n## Roadmap\r\n\r\n- Phase 1: Core Package MVP (NetworkX, CLI, Python API) \u2705\r\n- Phase 2: Neo4j Integration + LLM Extraction\r\n- Phase 3: KG Store (Private Alpha)\r\n- Phase 4: Multi-tenancy + Streaming\r\n- Phase 5: Public Release + Governance\r\n\r\n## Contributing\r\n\r\nContributions welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\r\n\r\n## License\r\n\r\nMIT \u2014 see [LICENSE](LICENSE) for details.\r\n\r\n## Support\r\n\r\n- Docs: https://kgops.readthedocs.io\r\n- Issues: https://github.com/SohamChaudhari2004/kgops/issues\r\n- Discussions: https://github.com/SohamChaudhari2004/kgops/discussions\r\n\r\n---\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "KGOps - End-to-End Knowledge Graph Operations for RAG & Data Integration",
"version": "0.1.2",
"project_urls": {
"Documentation": "https://github.com/SohamChaudhari2004/kgops",
"Homepage": "https://github.com/SohamChaudhari2004/kgops",
"Issues": "https://github.com/SohamChaudhari2004/kgops/issues",
"Repository": "https://github.com/SohamChaudhari2004/kgops"
},
"split_keywords": [
"knowledge-graph",
" rag",
" nlp",
" ai",
" machine-learning"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1b8046997a818305ed7346ac08e0a31eef922dfae3a28dbbe8ae7ae290e41320",
"md5": "41109dd32969a15d021f00ed70ddc6ab",
"sha256": "dcfa2fa9728efb2c040db459149c32d41d7e7fb1cc56fc9011fdc50ef294940c"
},
"downloads": -1,
"filename": "kgops-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "41109dd32969a15d021f00ed70ddc6ab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 50323,
"upload_time": "2025-09-05T17:31:42",
"upload_time_iso_8601": "2025-09-05T17:31:42.014218Z",
"url": "https://files.pythonhosted.org/packages/1b/80/46997a818305ed7346ac08e0a31eef922dfae3a28dbbe8ae7ae290e41320/kgops-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "667c05cc6e24fa260af8e36c0c88cb182784ac525b94e498241485b9a4d83b84",
"md5": "1c1987fa4bcd5480b45d09255672334c",
"sha256": "31c3340b3d974cacc5ebd1104613d3fbf517f26439455e9c1e5d451f88f80faf"
},
"downloads": -1,
"filename": "kgops-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "1c1987fa4bcd5480b45d09255672334c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 50115,
"upload_time": "2025-09-05T17:31:43",
"upload_time_iso_8601": "2025-09-05T17:31:43.614344Z",
"url": "https://files.pythonhosted.org/packages/66/7c/05cc6e24fa260af8e36c0c88cb182784ac525b94e498241485b9a4d83b84/kgops-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-05 17:31:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SohamChaudhari2004",
"github_project": "kgops",
"github_not_found": true,
"lcname": "kgops"
}