Git Product home page Git Product logo

Comments (6)

felixlinker avatar felixlinker commented on June 6, 2024

To be complete: It seems like you can't even get a document by _id on a collection.

from python-arango.

joowani avatar joowani commented on June 6, 2024

Hi @felixlinker

That's right. The internal REST API provided by ArangoDB (which python-arango builds on top of) does not expose calls to handle documents via their _id field. Could you please let me know what your use case is? The _key and _rev fields should be enough to let you handle all documents uniquely.

Thanks,
Joohwan

from python-arango.

felixlinker avatar felixlinker commented on June 6, 2024

I'm trying to validate input. In a method that will add an edge I'd like to check whether the referenced _from/_to documents are present in the database.

pyArango manages to do do it. But it seems like they just split the _id. Of course that is something I could do by myself. (But don't get me wrong I prefer your python-arango over pyArango ;) ). Here is my reference: https://github.com/tariqdaouda/pyArango/blob/master/pyArango/database.py#L118

from python-arango.

joowani avatar joowani commented on June 6, 2024

Right I see what you mean. Adding that method to the db class should be trivial. I will take a note of this when working on the next release. Unfortunately, as of right now you will have to do the manual splitting yourself. Thanks for pointing this out and sorry for the inconvenience!

from python-arango.

felixlinker avatar felixlinker commented on June 6, 2024

No worries! There's nothing for me to complain about. You're developing open source therefore I can't demand anything from you. In the worst case I'd stop using your package. But I won't stop using it because it's good!

Thanks anyways for adding it.

from python-arango.

joowani avatar joowani commented on June 6, 2024

Hi @felixlinker,

I added a new method Database.get_document to cover your use case in the latest release https://github.com/joowani/python-arango/releases/tag/3.5.0. Please check it out and let me know if you have any problems with it. Closing this out. Thanks.

from python-arango.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.