How to use safe_client_libs in python?


#61

Quick note. I had 15 minutes to poke around, and the auth_set_additional_search_path method was just the ticket.

adding
“void auth_set_additional_search_path(char const* new_path, void* user_data, void (*o_cb)(void* user_data, FfiResult const* result));” to the cdef, and calling with

lib2.auth_set_additional_search_path(ffi.new(‘char[]’,’…/compiled_binaries’.encode()), ffi.NULL, change_crust_location_cb)

before the stem_exe command indeed initializes from the provided config, and doesn’t create a new one in the python bin directory. Victory!

Lots of work to do, but 100% possible to make a portable package with no leakage into the python install :slight_smile: Look forwards to having more time on friday.


#62

This is indeed the case… bundling it as a compiled .exe would get around this. Using the provided method before initializing the stem is far cleaner and more flexible though. :slight_smile:


#63

Okay - I have the strong impression you have a plan!
That is way more than my poking around so I’m looking forward to learning new things =)


#64

Well into it now. Expect a large pull request this eve.


#65

Pull request sent. It is now reorganized as an importable, installable and pypi friendly library. Automatically reads and binds the headers, then binds the local config file before logging in. Hello world in examples demonstrates the basic api. Lots to do, but now we are rolling. We should continue #todos over email. Looking forwards to serving the community


#66

I was working late today - will have a look after a shower and yes makes sense! Awesome!


#67

Minor announcement

@DASK and I just created a telegram group for coordinating everything connected to the Python api

In case someone else wants to get involved too we’re at t.me/pysafe :slight_smile: