Skip to content

miosomos/pykagcee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pykagcee

This library is used to create a knowledge graph from a python project. It is based on the modelscope_agent/environment/graph_database package from the ModelScope-Agent project, but ported to be used as a standalone packaged CLI interface.

Requirements

  • Neo4j DBMS (local or remote). We recommend using the Neo4j Desktop application due to its better performance.
  • uv tool to manage python virtual environment and dependencies.

Installation

Clone the repository and set the environment variables in a .env:

cp .env.example .env

Set your Neo4j connection details in the .env file:

NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=your_password

Create environment and install dependencies:

uv sync

Usage

Build single knowledge graph

Create a knowledge graph for a single Python project.

uv run pykagcee build /path/to/single/project

Build multiple knowledge graphs

Create knowledge graphs for multiple Python projects under a directory.

uv run pykagcee build-all /path/to/multiple/projects

Wipe all graphs

Clean all databases.

uv run pykagcee wipe

Modifications

This project includes modifications made by Perer876:

  • 01/07/2025: Extract the graph_database package from the ModelScope-Agent project and add it to this project.
  • 30/08/2025: Several changes to support the CLI interface and multiple graph creation.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

Acknowledgments

This project is based on the ModelScope Agent project by Alibaba ModelScope. See the NOTICE file for details.

About

Knowledge Graph Constructor for python projects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages