terminusdb / terminusdb/terminusdb-client-python
add support for unfolding to python schema
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 80
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
adding _unfoldable = [] does nothing when creating a schema with the python client.
E.g.:
myschema = Schema()
class Method(DocumentTemplate):
_schema = myschema
linked = OtherClass
_unfoldable = [] #
Expected output: The resulting schema has @unfoldable in the document definition, but it hasn't.
Describe the solution you'd like
for unfoldable, it seems that it could just function analogous to _schema or _abstract. so _unfoldable = [].
Describe alternatives you've considered
Decorator.
Additional context
Im trying to use terminus exclusively from python (i.e. i'd like to be able to access all functionality in a pythonic way, including retrieval -> need to be able to have unfoldable for the db to return a subgraph/tree instead of only a list of solutions).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Python schema construction handles the existing _schema and _abstract attributes, then compare that path with document-definition generation. Implement support for _unfoldable = [] so the resulting definition includes @unfoldable, and verify that the generated schema supports retrieval of the requested subgraph or tree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100