{"id":13502229,"url":"https://github.com/neo4j-contrib/neomodel","last_synced_at":"2026-03-17T22:04:36.600Z","repository":{"id":4637710,"uuid":"5782449","full_name":"neo4j-contrib/neomodel","owner":"neo4j-contrib","description":"An Object Graph Mapper (OGM) for the Neo4j graph database.","archived":false,"fork":false,"pushed_at":"2026-02-27T15:59:46.000Z","size":2925,"stargazers_count":1074,"open_issues_count":52,"forks_count":246,"subscribers_count":45,"default_branch":"master","last_synced_at":"2026-02-27T20:43:48.209Z","etag":null,"topics":["neo4j","ogm","python"],"latest_commit_sha":null,"homepage":"https://neomodel.readthedocs.io","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/neo4j-contrib.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2012-09-12T16:17:06.000Z","updated_at":"2026-02-27T03:13:03.000Z","dependencies_parsed_at":"2024-01-02T09:56:31.844Z","dependency_job_id":"8c7bf211-43ff-445e-a953-e210c459bef9","html_url":"https://github.com/neo4j-contrib/neomodel","commit_stats":{"total_commits":1440,"total_committers":109,"mean_commits":"13.211009174311927","dds":0.5590277777777778,"last_synced_commit":"0194f3a8b2e93ec44e2089f21eacb12f15b86c70"},"previous_names":["robinedwards/neomodel"],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/neo4j-contrib/neomodel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j-contrib%2Fneomodel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j-contrib%2Fneomodel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j-contrib%2Fneomodel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j-contrib%2Fneomodel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neo4j-contrib","download_url":"https://codeload.github.com/neo4j-contrib/neomodel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j-contrib%2Fneomodel/sbom","scorecard":{"id":679460,"data":{"date":"2025-08-11","repo":{"name":"github.com/neo4j-contrib/neomodel","commit":"bbf7a681850dedcdebc4617ba9772e71fb4d8a08"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.3,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'packages' permission set to 'read': .github/workflows/codeql.yml:25","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:29","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/integration-tests.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/python-publish.yml:16","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":5,"reason":"Found 5/9 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":10,"reason":"15 commit(s) and 8 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/neo4j-contrib/neomodel/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration-tests.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/neo4j-contrib/neomodel/integration-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration-tests.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/neo4j-contrib/neomodel/integration-tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/integration-tests.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/neo4j-contrib/neomodel/integration-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/neo4j-contrib/neomodel/python-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/neo4j-contrib/neomodel/python-publish.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/integration-tests.yml:33","Warn: pipCommand not pinned by hash: .github/workflows/integration-tests.yml:34","Warn: pipCommand not pinned by hash: .github/workflows/integration-tests.yml:44","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:31","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:32","Info:   2 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/python-publish.yml:19"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (28) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T22:37:07.049Z","repository_id":4637710,"created_at":"2025-08-21T22:37:07.049Z","updated_at":"2025-08-21T22:37:07.049Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30633240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: 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":["neo4j","ogm","python"],"created_at":"2024-07-31T22:02:06.761Z","updated_at":"2026-03-17T22:04:36.592Z","avatar_url":"https://github.com/neo4j-contrib.png","language":"Python","funding_links":[],"categories":["Python","Connectors","REST API"],"sub_categories":["REST API","Python"],"readme":"![neomodel](https://raw.githubusercontent.com/neo4j-contrib/neomodel/master/doc/source/_static/neomodel-300.png)\n\nAn Object Graph Mapper (OGM) for the [neo4j](https://neo4j.com/) graph\ndatabase, built on the awesome\n[neo4j_driver](https://github.com/neo4j/neo4j-python-driver)\n\nIf you need assistance with neomodel, please create an issue on the\nGitHub repo found at \u003chttps://github.com/neo4j-contrib/neomodel/\u003e.\n\n-   Familiar class based model definitions with proper inheritance.\n-   Powerful query API.\n-   Schema enforcement through cardinality restrictions.\n-   Full transaction support.\n-   Thread safe.\n-   Pre/post save/delete hooks.\n-   Django integration via\n    [django_neomodel](https://github.com/neo4j-contrib/django-neomodel)\n\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=neo4j-contrib_neomodel\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=neo4j-contrib_neomodel)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=neo4j-contrib_neomodel\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=neo4j-contrib_neomodel)\n[![Documentation Status](https://readthedocs.org/projects/neomodel/badge/?version=latest)](https://neomodel.readthedocs.io/en/latest/?badge=latest)\n\n# Requirements\n\n**For neomodel releases 6.x :**\n\n- Python 3.10+\n- Neo4j 2025.x.x, 5.x, 4.4 (LTS)\n- Neo4j Enterprise, Community and Aura are supported\n\n**For neomodel releases 5.x :**\n\n-   Python 3.8+\n-   Neo4j 5.x, 4.4 (LTS)\n\n**For neomodel releases 4.x :**\n\n-   Python 3.7 -\\\u003e 3.10\n-   Neo4j 4.x (including 4.4 LTS for neomodel version 4.0.10)\n\n# Documentation\n\nAvailable on\n[readthedocs](http://neomodel.readthedocs.org).\n\nAlso check out DeepWiki : [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/neo4j-contrib/neomodel)\n\n# New in 6.0.0\n\nFrom now on, neomodel will use **SemVer (major.minor.patch)** for versioning.\n\nThis version introduces a modern configuration system, using a dataclass with typing, runtime and update validation rules, and environment variables support.\nSee the [documentation](https://neomodel.readthedocs.io/en/latest/configuration.html) section for more details.\n\n[Semantic Indexes](https://neomodel.readthedocs.io/en/latest/semantic_indexes.html#) (Vector and Full-text) are now natively supported so you do not have to use a custom Cypher query. Special thanks to @greengori11a for this.\n\n### Breaking changes\n\n* List object resolution from Cypher was creating \"2-depth\" lists for no apparent reason. This release fixes this so that, for example \"RETURN collect(node)\" will return the nodes directly as a list in the result. In other words, you can extract this list at `results[0][0]` instead of `results[0][0][0]`\n* See more breaking changes in the [documentation](http://neomodel.readthedocs.org)\n\n# Installation\n\nInstall from pypi (recommended):\n\n    $ pip install neomodel ($ source dev # To install all things needed in a Python3 venv)\n\n    # neomodel can use the Rust extension to the Neo4j driver for faster transport, to install use:\n\n    $ pip install neomodel[rust-driver-ext]\n\n    # neomodel has some optional dependencies (Shapely, pandas, numpy), to install these use:\n\n    $ pip install neomodel[extras, rust-driver-ext]\n\nTo install from github:\n\n    $ pip install git+git://github.com/neo4j-contrib/neomodel.git@HEAD#egg=neomodel-dev\n\n# Performance comparison\n\nYou can find some performance tests made using Locust [in this repo](https://github.com/mariusconjeaud/neomodel-locust).\n\nTwo learnings from this :\n\n* The wrapping of the driver made by neomodel is very thin performance-wise : it does not add a lot of overhead ;\n* When used in a concurrent fashion, async neomodel is faster than concurrent sync neomodel, and a lot faster than serial queries.\n\n# Contributing\n\nIdeas, bugs, tests and pull requests always welcome. Please use\nGitHub\\'s Issues page to track these.\n\nIf you are interested in developing `neomodel` further, pick a subject\nfrom the Issues page and open a Pull Request (PR) for it. If you are\nadding a feature that is not captured in that list yet, consider if the\nwork for it could also contribute towards delivering any of the existing\nissues too.\n\n## Running the test suite\n\nMake sure you have a Neo4j database version 4 or higher to run the tests\non.:\n\n    $ export NEO4J_BOLT_URL=bolt://\u003cusername\u003e:\u003cpassword\u003e@localhost:7687 # check your username and password\n\nEnsure `dbms.security.auth_enabled=true` in your database configuration\nfile. Setup a virtual environment, install neomodel for development and\nrun the test suite: :\n\n    $ pip install -r requirements-dev.txt\n    $ pytest\n\nThe tests in \\\"test_connection.py\\\" will fail locally if you don\\'t\nspecify the following environment variables:\n\n    $ export AURA_TEST_DB_USER=username\n    $ export AURA_TEST_DB_PASSWORD=password\n    $ export AURA_TEST_DB_HOSTNAME=url\n\nIf you are running a neo4j database for the first time the test suite\nwill set the password to \\'test\\'. If the database is already populated,\nthe test suite will abort with an error message and ask you to re-run it\nwith the `--resetdb` switch. This is a safeguard to ensure that the test\nsuite does not accidentally wipe out a database if you happen to not\nhave restarted your Neo4j server to point to a (usually named)\n`debug.db` database.\n\nIf you have `docker-compose` installed, you can run the test suite\nagainst all supported Python interpreters and neo4j versions: :\n\n    # in the project's root folder:\n    $ sh ./tests-with-docker-compose.sh\n\n## Developing with async\n\n### Transpiling async -\u003e sync\n\nWe use [this great library](https://github.com/python-trio/unasync) to automatically transpile async code into its sync version.\n\nIn other words, when contributing to neomodel, only update the `async` code in `neomodel/async_`, then run : :\n\n    bin/make-unasync\n    isort .\n    black .\n\nNote that you can also use the pre-commit hooks for this.\n\n### Specific async/sync code\nThis transpiling script mainly does two things :\n\n- It removes the await keywords, and the Async prefixes in class names\n- It does some specific replacements, like `adb`-\u003e`db`, `mark_async_test`-\u003e`mark_sync_test`\n\nIt might be that your code should only be run for `async`, or `sync` ; or you want different stubs to be run for `async` vs `sync`.\nYou can use the following utility function for this - taken from the official [Neo4j python driver code](https://github.com/neo4j/neo4j-python-driver) :\n\n    # neomodel/async_/core.py\n    from neomodel._async_compat.util import AsyncUtil\n\n    # AsyncUtil.is_async_code is always True\n    if AsyncUtil.is_async_code:\n        # Specific async code\n        # This one gets run when in async mode\n        assert await Coffee.nodes.check_contains(2)\n    else:\n        # Specific sync code\n        # This one gest run when in sync mode\n        assert 2 in Coffee.nodes\n\nYou can check [test_match_api](test/async_/test_match_api.py) for some good examples, and how it's transpiled into sync.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneo4j-contrib%2Fneomodel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneo4j-contrib%2Fneomodel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneo4j-contrib%2Fneomodel/lists"}