cerbos / query-plan-adapters

Repo of adapters converting a Cerbos Query Plan to a data fetching layer
Apache License 2.0
16 stars 9 forks source link

Support for Django ORM #47

Closed j-riebe closed 1 year ago

j-riebe commented 1 year ago

I'd like to contribute support for django ORM. Take a look at the fork here.

The django adapter is heavily inspired by the sqlalchemy adapter. It passes the pre-defined test suite and adds a test for the nested resource policy (currently missing in the sqlalchemy adapter).

Open Todos:

Running locally Setting up the environment requires poetry.

Checkout the repo https://github.com/optiscaners/query-plan-adapters.git at the branch django

To install the environment and run the tests:

make install runtests

or without make:

poetry install --all-extras
pytest
charithe commented 1 year ago

Hi. Thanks for building this. It's really cool 🙌🏽

Instead of being a fork of this repo, I suggest that you make it a repo dedicated to just the Django adapter. We'll be happy to link to it as a community project so that others can discover it. The reason for this is that if we incorporate it into this repo, we'll be responsible for maintaining it and keeping it compatible with Django releases going forward. Unfortunately, we don't have Django expertise in the team to do that at the moment.

j-riebe commented 1 year ago

Alright, then lets do it that way 👍

Thanks for the fast response.

charithe commented 1 year ago

Please let us know when it's ready so that we can link to it.