Replies: 1 comment
-
Hey @eHorn96! It should also be possible to instantiate an import networkx as nx
import nx_arangodb as nxadb
from arango import ArangoClient
client = ArangoClient(hosts=...)
db_1 = client.db("foo", username=..., password=...)
db_2 = client.db("bar", username=..., password=...)
G_1 = nxadb.Graph(name='1', db=db)
G_2 = nxadb.Graph(name='2', db=db) However, if environment variables are not set and this code is run, you'll encounter an This is because we currently rely on the concept of a [NetworkX Config] (https://networkx.org/documentation/stable/reference/configs.html) to store connection credentials for when we want to retrieve data from ArangoDB. This unfortunately results in being unable to fully benefit from parameterizing the connection credentials to a graph instance. I think this is possible to address this, let me take a look and get back to you. We could probably transition away from using the NetworkX Config, and seeing if we can just propagate the connection credentials from the |
Beta Was this translation helpful? Give feedback.
-
Hi guys,
I just came across your repo while researching about a final I'm doing currently where the goal is to implement an application for master-data-management and supply-chain and immediately saw its great potential.
I implemented some hacky logic for authenticating with ArangoDB in FastAPI already using the python-arango driver and wanted to now use yours to act as a drop-in replacement for setting up sessions.
What I immediately noticed was that the connection is achieved solely on environment variables.
As such if you wanted to have multiple users without them having to share the same credentials I see either:
1. Creating a separate environment for every user who exists or might sign up in its current state (more overhead than value imo)
or
2. Lazily update the environment variables for authentication inside some request processing logic (which sounds like something only the dark gods fumble with)
as the only 2 ways of achieving this.
Is there a particular reason that speaks against implementing parametrization to a graph instance during run-time? From my experience it does seem so, since I couldn't see anything in NetworkX's documentation nor in this repo's documentation.
If you're open for it, I forked the repo already and would look into possible implementations. Also please do tell me if my approach of using arangodb's user management for authentication logic is the wrong one on a more fundamental, system-design way since thorough research made me give up and just implement it myself.
also, i know Foxx exists but I have, some strong opinions about using JS for anything else than funni ui 💀
Let me know what you think!
Best regards
Erik
Beta Was this translation helpful? Give feedback.
All reactions