RelationalAI / rai-sdk-python

The RelationalAI Software Development Kit (SDK) for Python.
Apache License 2.0
17 stars 4 forks source link

create .rai if necessary #147

Closed sswatson closed 6 months ago

sswatson commented 6 months ago

It used to be the case that the SDK could write to ~/.rai/tokens.json no problem because that folder already had to exist for the config setup to work. But now that that folder may be missing, you can end up getting warnings all over the place in code that depends on the SDK (for example, PyRel).

This fix simply checks whether the directory exists before writing the cache and creates it if necessary.