🕷️ Weave your data into beautiful connections
Project description
Weaver
Python project scaffolding tool that generates entity-resolution projects from bundled cookiecutter templates.
Features
- Generate complete entity-resolution projects with a single command
- Multiple project templates optimized for different use cases
- LLM-powered ontology generation for knowledge graphs
- Integrated support for databases, orchestrators, APIs, and search engines
- Docker and testing support out of the box
Installation
pip install weaver
Or install from source:
git clone https://github.com/yourusername/weaver.git
cd weaver
uv sync
Quick Start
Create a new project:
# Create a knowledge graph project
weaver create --template knowledge-graph --name my-project
# Create an advanced search project
weaver create --template advanced-search --name my-search-app
# List available templates
weaver list-templates
CLI Commands
create
Generate a new project from a template.
weaver create --template <template-name> --name <project-name> [options]
Options:
--name,-n- Name of your project--template,-t- Project template to use (see available templates below)--list-deps- Show dependencies without creating project
Knowledge Graph Options:
--ontology/--no-ontology- Enable/disable ontology generation (default: enabled)--llm anthropic|openai- LLM provider for ontology generation (default: anthropic)--db-host- Database host for schema inspection (default: localhost)--db-port- Database port for schema inspection (default: 5432)
Examples:
# Basic knowledge graph project
weaver create --template knowledge-graph --name company-kg
# Knowledge graph with OpenAI for ontology generation
weaver create --template knowledge-graph --name my-kg --llm openai
# Advanced search project
weaver create --template advanced-search --name search-engine
# Show dependencies without creating project
weaver create --template knowledge-graph --name test --list-deps
list-templates
List all available project templates.
weaver list-templates
templates
Show detailed information about available templates.
weaver templates
version
Show Weaver version.
weaver version
Available Templates
knowledge-graph
Build knowledge graphs with Neo4j, web scraping, and LLM-powered ontology generation.
Includes:
- Neo4j graph database
- Web scraping and API data extraction
- Prefect orchestration
- FastAPI endpoints
- NLP processing
- LLM-powered ontology designer
- Schema inspection tools
Best for: Entity resolution, knowledge graphs, relationship mapping
See the full demo: Knowledge Graph Demo Guide
advanced-search
Hybrid sparse and vector search system optimized for complex queries.
Includes:
- PostgreSQL with vector extensions
- Hybrid vector + keyword search
- Prefect orchestration
- FastAPI search endpoints
- Web scraping
Best for: Search engines, recommendation systems, semantic search
news-analyzer
News aggregation and analysis with bias detection.
Includes:
- PostgreSQL database
- NLP processing
- Vector search
- Elasticsearch
- API and web scraping
Best for: Content analysis, news aggregation, sentiment analysis
basic
Simple entity-relationship project for quick prototyping.
Includes:
- SQLite database
- Simple orchestrator
- Basic project structure
Best for: Learning, prototyping, simple data projects
Project Structure
Generated projects follow a consistent architecture:
my-project/
├── src/
│ ├── extractors/ # Data gathering (web, API, files, DB)
│ ├── storage/ # Database integration
│ ├── pipeline/ # Orchestration workflows
│ ├── api/ # REST/search endpoints (optional)
│ ├── ontology/ # Schema inspection & ontology generation (optional)
│ └── config/
│ └── settings.py # Configuration with env variables
├── tests/
├── pyproject.toml
├── README.md
├── .env.example
└── docker-compose.yml # If Docker enabled
Knowledge Graph with Ontology Generation
Weaver's knowledge graph template includes powerful LLM-based ontology generation:
# Create knowledge graph project
weaver create --template knowledge-graph --name company-kg --ontology
cd company-kg
# Set your API key
export ANTHROPIC_API_KEY=sk-ant-your-key-here
# Inspect database schema
python -m src.ontology.schema_inspector 'postgresql://user:pass@localhost/mydb'
# Generate ontology from schema using Claude
python -m src.ontology.llm_designer 'postgresql://user:pass@localhost/mydb' MyOntology
The ontology generator will:
- Analyze your database schema
- Identify entity classes and relationships
- Detect natural keys for entity resolution
- Generate properties and cardinality constraints
- Provide design explanations and improvement suggestions
- Export as JSON for implementation in Neo4j
Complete walkthrough: See DEMO_KNOWLEDGE_GRAPH.md for a full step-by-step demo with sample data.
Configuration
Each template supports different configurations:
- Databases: SQLite, PostgreSQL, Neo4j, MongoDB
- Orchestrators: Prefect, Dagster, Simple
- Search Engines: Vector Hybrid, Elasticsearch, None
- API Frameworks: FastAPI, Flask, Django, None
- Features: Vector search, NLP, web scraping, API scraping, Docker, pytest
Development
# Install dependencies
uv sync
# Run tests
pytest
# Run CLI locally
uv run weaver --help
# Build package
uv build
Requirements
- Python 3.8+
- PostgreSQL (for ontology generation and some templates)
- Neo4j (for knowledge graph template)
- LLM API key (Anthropic or OpenAI) for ontology generation
License
MIT
Contributing
Contributions welcome! Please open an issue or submit a pull request.
Resources
- Knowledge Graph Demo - Complete walkthrough with ontology generation
- Cookiecutter Documentation
- Neo4j Graph Database
- Prefect Workflows
- Anthropic API
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file data_weaver_cli-0.1.10.tar.gz.
File metadata
- Download URL: data_weaver_cli-0.1.10.tar.gz
- Upload date:
- Size: 42.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c1936cd64435d4f51e81a6c46e57bdaeb15509ac672a432b8f3208b9332aabf
|
|
| MD5 |
a8a78475bb3430307f143d85170f5de5
|
|
| BLAKE2b-256 |
b258c936e24e2a3878722d11b594dc385feeb685a9a9483acf8504f73bec26bd
|
Provenance
The following attestation bundles were made for data_weaver_cli-0.1.10.tar.gz:
Publisher:
publish.yml on adrianmoses/weaver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
data_weaver_cli-0.1.10.tar.gz -
Subject digest:
1c1936cd64435d4f51e81a6c46e57bdaeb15509ac672a432b8f3208b9332aabf - Sigstore transparency entry: 819829670
- Sigstore integration time:
-
Permalink:
adrianmoses/weaver@303dc929e8f68756a157a7e95e6a97d21f057ee4 -
Branch / Tag:
refs/tags/v0.1.10 - Owner: https://github.com/adrianmoses
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@303dc929e8f68756a157a7e95e6a97d21f057ee4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file data_weaver_cli-0.1.10-py3-none-any.whl.
File metadata
- Download URL: data_weaver_cli-0.1.10-py3-none-any.whl
- Upload date:
- Size: 60.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e36c211f18a809a313c3109ba2a66ae3f862437e4c797781aae85ea9682975c
|
|
| MD5 |
30dc1a588e953bddd1bec103c7aba5a6
|
|
| BLAKE2b-256 |
13652bbb3a8f8e1249f2814e6d3eabdaa16da6a5dba313361db18cb0faa3741f
|
Provenance
The following attestation bundles were made for data_weaver_cli-0.1.10-py3-none-any.whl:
Publisher:
publish.yml on adrianmoses/weaver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
data_weaver_cli-0.1.10-py3-none-any.whl -
Subject digest:
0e36c211f18a809a313c3109ba2a66ae3f862437e4c797781aae85ea9682975c - Sigstore transparency entry: 819829680
- Sigstore integration time:
-
Permalink:
adrianmoses/weaver@303dc929e8f68756a157a7e95e6a97d21f057ee4 -
Branch / Tag:
refs/tags/v0.1.10 - Owner: https://github.com/adrianmoses
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@303dc929e8f68756a157a7e95e6a97d21f057ee4 -
Trigger Event:
push
-
Statement type: