Re: Attempts at using PyDAOS
Pittman, Ashley M
Alex,
Can you elaborate on what it is you’re trying to achieve? There are really two parts to the python bindings, there’s pydaos.raw which is using ctypes to open the daos client shared library from python, this is mostly used in the testing to create containers and do any setup for testing, or simply as a quick way to invoke the DAOS API.
The second part of the python binding is pydaos itself, which is a python module which is in part written in C and is a direct client of daos, it’s here that we’re concentrating most of the work on DAOS clients (as opposed to tools/setup) and this is where the key/value store is accessed. For this you should look at the KVObj() object, which exports a dict like object, which can also support bulk put/get. Also included but scheduled for overhaul and partial removal is the daosdbm module which is in the source tree but not installed, the daos_named_kv() object here is the one to look at for one way to import daos and open multiple kv stores by name.
https://github.com/daos-stack/daos/blob/master/src/client/pydaos/pydaos_core.py#L235 https://github.com/daos-stack/daos/blob/master/src/client/pydaos/daosdbm.py#L30-L72
Nothing has changed in this area in the last month, but there is work to change how daos_init() is called from within pydaos which will affect and hopefully improve the way the module is imported, but that’s still work-in-progress.
I’ll file a ticket and resolve the spelling errors in the codebase/documentation..
Ashley,
From:
<daos@daos.groups.io> on behalf of "Alex Barcelo via groups.io" <alex@...>
I have a DAOS installation for evaluation/exploration and I was trying to make the Python bindings work. My first contact with PyDAOS is at the official documentation https://daos-stack.github.io/user/interface/#python-bindings which talks about a "DAOS key-value store API with python dictionnaries[sic]" but doesn't give any example about how to create that object (or am I missing something obvious?). I decided to move to something more elemental and play around the pydaos.raw bindings, seeing that there is some example here: https://github.com/daos-stack/daos/blob/master/src/client/pydaos/raw/README.md The
Otherwise I get a The problem I have not been able to solve is the following: When I reach the
I know that the problem is related to my non-root installation where instead of using /var/run/daos* I am using another folder (I figured that much in the logs with the line
Of course I am missing some configuration step. Which configuration step am I missing? Where should I configure the non-default /var/run/daos_agent alternative path? Or am I doing something inappropriate? --------------------------------------------------------------------- This e-mail and any attachments may contain confidential material for
|
|