{"id":13567028,"url":"https://github.com/memgraph/gqlalchemy","last_synced_at":"2025-04-14T06:05:02.293Z","repository":{"id":37905109,"uuid":"317582784","full_name":"memgraph/gqlalchemy","owner":"memgraph","description":"GQLAlchemy is a library developed with the purpose of assisting in writing and running queries on Memgraph. GQLAlchemy supports high-level connection to Memgraph as well as modular query builder.","archived":false,"fork":false,"pushed_at":"2025-03-25T15:02:03.000Z","size":2641,"stargazers_count":249,"open_issues_count":41,"forks_count":35,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-04-14T06:04:45.300Z","etag":null,"topics":["graph-database","graphs","memgraph","neo4j","neo4j-client","networkx","object-graph-mapper","ogm","python","query-builder","schema-validation"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/gqlalchemy/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memgraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-01T15:22:22.000Z","updated_at":"2025-04-07T21:53:12.000Z","dependencies_parsed_at":"2023-09-23T00:29:46.662Z","dependency_job_id":"ca8b0ef0-5d10-4726-ab81-758258062ed2","html_url":"https://github.com/memgraph/gqlalchemy","commit_stats":{"total_commits":268,"total_committers":23,"mean_commits":"11.652173913043478","dds":0.8432835820895522,"last_synced_commit":"d0f5e4d664c0b0fdeed83cd8a610d00b6f80ed7d"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fgqlalchemy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fgqlalchemy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fgqlalchemy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fgqlalchemy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memgraph","download_url":"https://codeload.github.com/memgraph/gqlalchemy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830396,"owners_count":21168272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["graph-database","graphs","memgraph","neo4j","neo4j-client","networkx","object-graph-mapper","ogm","python","query-builder","schema-validation"],"created_at":"2024-08-01T13:02:21.943Z","updated_at":"2025-04-14T06:05:02.208Z","avatar_url":"https://github.com/memgraph.png","language":"Python","readme":"# GQLAlchemy\n\n\u003cp\u003e\n    \u003ca href=\"https://github.com/memgraph/gqlalchemy/actions\"\u003e\u003cimg src=\"https://github.com/memgraph/gqlalchemy/workflows/Build%20and%20Test/badge.svg\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/memgraph/gqlalchemy/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/memgraph/gqlalchemy\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/gqlalchemy\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/gqlalchemy\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://memgraph.com/docs/gqlalchemy\" alt=\"Documentation\"\u003e\u003cimg src=\"https://img.shields.io/badge/documentation-GQLAlchemy-orange\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/memgraph/gqlalchemy/stargazers\" alt=\"Stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/memgraph/gqlalchemy?style=social\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**GQLAlchemy** is a fully open-source Python library and **Object Graph Mapper** (OGM) - a link between graph database objects and Python objects.\n\nAn Object Graph Mapper or OGM provides a developer-friendly workflow that allows for writing object-oriented notation to communicate with graph databases. Instead of writing Cypher queries, you will be able to write object-oriented code, which the OGM will automatically translate into Cypher queries.\n\n## Installation\n\n### Prerequisites\n\n- **Python 3.9 - 3.11**\n- [`pymgclient`](https://github.com/memgraph/pymgclient):\n\n  - Install `pymgclient` [build prerequisites](https://memgraph.github.io/pymgclient/introduction.html#build-prerequisites)\n  - Install `pymgclient` via pip:\n\n  ```bash\n  pip install --user pymgclient\n  ```\n\n\u003e [!WARNING]  \n\u003e Python 3.11 users: On Windows, GQLAlchemy is not yet compatible with this Python version. Linux users can install GQLAlchemy **without** the DGL extra (due to its dependencies not supporting Python 3.11 yet). If this is currently a blocker for you, please let us know by [opening an issue](https://github.com/memgraph/gqlalchemy/issues).\n\n### Install GQLAlchemy\n\nAfter you’ve installed the [prerequisites](#prerequisites), run the following command to install\nGQLAlchemy:\n\n```bash\npip install gqlalchemy\n```\n\nWith the above command, you get the default GQLAlchemy installation which\ndoesn’t include import/export support for certain formats (see below). To get\nadditional import/export capabilities, use one of the following install options:\n\n```bash\npip install gqlalchemy[arrow] # Support for the CSV, Parquet, ORC and IPC/Feather/Arrow formats\npip install gqlalchemy[dgl] # DGL support (also includes torch)\npip install gqlalchemy[docker] # Docker support\n\npip install gqlalchemy[all] # All of the above\n```\n\nIf you intend to use GQLAlchemy with PyTorch Geometric support, that library must be installed manually:\n\n```bash\npip install gqlalchemy[torch_pyg] # prerequisite\npip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.13.0+cpu.html\"\n```\n\nIf you are using the zsh terminal, surround `gqlalchemy[$extras]` with quotes:\n\n```bash\npip install 'gqlalchemy[arrow]'\n```\n\nIf you are using [Conda](https://docs.conda.io/en/latest/) for Python environment management, you can install GQLAlchemy through pip.\n\n## Build \u0026 Test\n\nThe project uses [Poetry](https://python-poetry.org/) to build the library. Clone or download the [GQLAlchemy source code](https://github.com/memgraph/gqlalchemy) locally and run the following command to build it from source with Poetry:\n\n```bash\npoetry install --all-extras\n```\n\nThe `poetry install --all-extras` command installs GQLAlchemy with all extras\n(optional dependencies). Alternatively, you can use the `-E` option to define\nwhat extras to install:\n\n```bash\npoetry install # No extras\n\npoetry install -E arrow # Support for the CSV, Parquet, ORC and IPC/Feather/Arrow formats\npoetry install -E dgl # DGL support (also includes torch)\npoetry install -E docker # Docker support\n```\n\nTo run the tests, make sure you have an [active Memgraph instance](https://memgraph.com/docs/getting-started), and execute one of the following commands:\n\n```bash\npoetry run pytest . -k \"not slow\" # If all extras installed\n\npoetry run pytest . -k \"not slow and not extras\" # Otherwise\n```\n\nIf you’ve installed only certain extras, it’s also possible to run their associated tests:\n\n```bash\npoetry run pytest . -k \"arrow\"\npoetry run pytest . -k \"dgl\"\npoetry run pytest . -k \"docker\"\n```\n\n## Development (how to build)\n\n```bash\npoetry run flake8 .\npoetry run black .\npoetry run pytest . -k \"not slow and not extras\"\n```\n\n## Documentation\n\nThe GQLAlchemy documentation is available on [GitHub](https://memgraph.github.io/gqlalchemy/).\n\nThe reference guide can be generated from the code by executing:\n\n```\npip3 install pydoc-markdown\npydoc-markdown\n```\n\nOther parts of the documentation are written and located at docs directory. To test the documentation locally execute:\n\n```\npip3 install mkdocs\npip3 install mkdocs-material\npip3 install pymdown-extensions\nmkdocs serve\n```\n\n## License\n\nCopyright (c) 2016-2023 [Memgraph Ltd.](https://memgraph.com)\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgraph%2Fgqlalchemy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemgraph%2Fgqlalchemy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgraph%2Fgqlalchemy/lists"}