{"id":42850776,"url":"https://github.com/mkh-user/graphite","last_synced_at":"2026-02-04T17:02:20.623Z","repository":{"id":335276318,"uuid":"1145012692","full_name":"mkh-user/graphite","owner":"mkh-user","description":"A clean, embedded graph database engine for Python. ","archived":false,"fork":false,"pushed_at":"2026-01-30T10:36:20.000Z","size":43,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"Main","last_synced_at":"2026-02-01T21:33:33.860Z","etag":null,"topics":["graphdb","pypi-package","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/graphitedb","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkh-user.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-29T10:10:17.000Z","updated_at":"2026-02-01T08:03:45.000Z","dependencies_parsed_at":"2026-01-31T13:00:52.123Z","dependency_job_id":null,"html_url":"https://github.com/mkh-user/graphite","commit_stats":null,"previous_names":["mkh-user/graphite"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mkh-user/graphite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkh-user%2Fgraphite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkh-user%2Fgraphite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkh-user%2Fgraphite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkh-user%2Fgraphite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkh-user","download_url":"https://codeload.github.com/mkh-user/graphite/tar.gz/refs/heads/Main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkh-user%2Fgraphite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29013709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T14:58:54.169Z","status":"ssl_error","status_checked_at":"2026-02-02T14:58:51.285Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphdb","pypi-package","python"],"created_at":"2026-01-30T12:03:25.634Z","updated_at":"2026-02-03T16:00:54.730Z","avatar_url":"https://github.com/mkh-user.png","language":"Python","readme":"# Graphite\n\nA clean, embedded graph database engine for Python.\n\n---\n\n**Graphite** is a lightweight yet flexible **graph database engine** implemented in pure Python.  \nIt is designed to model graph-like data inside large Python codebases **without introducing the complexity of an external database**.\n\n---\n\n## Features\n\n### 🧩 Embedded by Design\nGraphite is not a separate service or infrastructure dependency.  \nIt lives inside your project, evolves with it, and collaborates naturally with your existing code.\n\nNo servers. No ports. No deployment headaches.\n\n---\n\n### 🛠 Ready-made, Customizable Module\nGraphite is intentionally simple and hackable.  \nYou can fork it, modify it, or deeply integrate it into your project without fighting rigid abstractions.\n\nThe database adapts to your project — not the other way around.\n\n---\n\n### 🐍 Native Python API\nEverything is done through Python APIs.\nNo query strings.\nDSL parsing is just an optional layer.\nNo context switching.\n\nYour editor already knows how to autocomplete and document your queries.\n\n---\n\n### 🔍 Query? It’s Code.\nQueries are built by chaining Python methods on the `QueryResult` object.\n\n- Zero parsing cost\n- Full IDE support\n- Refactor-safe\n- Debuggable\n\n---\n\n### 🔄 Runtime Evolution\nChange structures, data, or even engine behavior **at runtime**.\nNo shutdowns.\nNo migrations.\nNo waiting.\n\n---\n\n### 🧱 Structure-Oriented Modeling\nDefine:\n- node types\n- relation types\n- fields\n- base types\n- valid forms\n\nModel your domain explicitly and safely.\n\n---\n\n### 🧬 Node Inheritance\nCreate base node types and extend them with shared properties and advanced relationships.\n\n---\n\n### ✨ Simple, Predictable Syntax\nFrom defining structures to querying data, every step favors clarity and minimal syntax.\n\n---\n\n### 💾 Serializable\nPersist the entire database into a single file.\n\n---\n\n## Installation\n\nInstall from **PyPI**:\n\n```bash\npip install graphitedb\n````\n\n---\n\n## Why Graphite?\n\nGraphite was extracted from a **large production codebase** where Neo4j introduced more complexity than value.\n\nNeo4j is a powerful tool — but in large projects, adding a separate graph database often increases:\n\n* infrastructure complexity\n* deployment cost\n* maintenance burden\n* cognitive load on developers\n\nGraphite exists for cases where this cost is **not justified**.\n\nIt provides graph modeling **without adding another system to operate**.\n\n---\n\n## Example Usage\n\n```python\nimport graphite\n\ndef example_complete_dsl_loading():\n    engine = graphite.engine()\n\n    complete_dsl = \"\"\"\n    # Define node types\n    node Person\n        name: string\n        age: int\n\n    node User from Person\n        id: string\n        email: string\n\n    node Object\n    node Book from Object\n        title: string\n        n_pages: int\n\n    node Car from Object\n        model: string\n        year: int\n\n    # Define relation types\n    relation FRIEND both\n        Person - Person\n        since: date\n\n    relation OWNER reverse OWNED_BY\n        Person -\u003e Object\n        since: date\n        purchased_at: date\n\n    relation AUTHOR reverse AUTHORED_BY\n        Person -\u003e Book\n        year: int\n\n    # Create nodes\n    User, user_1, \"Joe Doe\", 32, \"joe4030\", \"joe@email.com\"\n    User, user_2, \"Jane Smith\", 28, \"jane28\", \"jane@email.com\"\n    User, user_3, \"Bob Wilson\", 45, \"bob45\", \"bob@email.com\"\n    User, user_4, \"Alice Brown\", 22, \"alice22\", \"alice@email.com\"\n\n    Book, book_1, \"The Great Gatsby\", 180\n    Book, book_2, \"Python Programming\", 450\n    Book, book_3, \"Graph Databases\", 320\n\n    Car, car_1, \"Toyota Camry\", 2020\n    Car, car_2, \"Honda Civic\", 2018\n\n    # Create relations\n    user_1 -[FRIEND, 2020-05-15]- user_2\n    user_1 -[FRIEND, 2019-08-22]- user_3\n    user_2 -[FRIEND, 2021-01-10]- user_4\n\n    user_1 -[OWNER, 2021-03-01, 2021-02-15]-\u003e car_1\n    user_2 -[OWNER, 2019-06-20, 2019-05-10]-\u003e book_1\n    user_3 -[OWNER, 2022-11-05, 2022-10-20]-\u003e book_2\n\n    user_1 -[AUTHOR, 2020]-\u003e book_3\n    user_2 -[AUTHOR, 2021]-\u003e book_2\n    \"\"\"\n\n    engine.load_dsl(complete_dsl)\n\n    users = engine.query.User.get()\n    print([u[\"name\"] for u in users])\n\n    return engine\n```\n\nMore examples are available in `example.py` in the GitHub repository.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkh-user%2Fgraphite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkh-user%2Fgraphite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkh-user%2Fgraphite/lists"}