Skip to main content

Common utilities and types for GraphRAG

Project description

GraphRAG Common

This package provides utility modules for GraphRAG, including a flexible factory system for dependency injection and service registration, and a comprehensive configuration loading system with Pydantic model support, environment variable substitution, and automatic file discovery.

Factory module

The Factory class provides a flexible dependency injection pattern that can register and create instances of classes implementing a common interface using string-based strategies. It supports both transient scope (creates new instances on each request) and singleton scope (returns the same instance after first creation).

Open the notebook to explore the factory module example code

Config module

The load_config function provides a comprehensive configuration loading system that automatically discovers and parses YAML/JSON config files into Pydantic models with support for environment variable substitution and .env file loading. It offers flexible features like config overrides, custom parsers for different file formats, and automatically sets the working directory to the config file location for relative path resolution.

Open the notebook to explore the config module example code

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

graphrag_common-3.0.4.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphrag_common-3.0.4-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file graphrag_common-3.0.4.tar.gz.

File metadata

  • Download URL: graphrag_common-3.0.4.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.17

File hashes

Hashes for graphrag_common-3.0.4.tar.gz
Algorithm Hash digest
SHA256 ce66b761bc67d9dea3ae55ddf3c9ec9200243ed6b842f5ceb44cea8faa7486e2
MD5 fa3da27e2cd6449d0817f7c196391318
BLAKE2b-256 d258a50979a8e92835a83c66f064f2103525dbd09727b782aedf7fdc6e96758f

See more details on using hashes here.

File details

Details for the file graphrag_common-3.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for graphrag_common-3.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2ac5a9f723e6533dd07d3cd9d3e2f0eb7d398b3be627c2552d30620540ff18ba
MD5 ea52ac1c5a3d8abb0fb86b447771eb0c
BLAKE2b-256 e1d2eadbb8c3b0ac18c7cbb806193d1b67f3acd0db284bc70c0feb4bb20699bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page