
-
madivad
Good point re local decreyption key and storing it in the cloud.
TBH, it's more an exercise in "how" to do it, mostly because I've never worried too much because it is only me. But I'm looking to want to do more interesting stuff with APIs that are potentially dangerous (very limited financial access) and also "play" with the idea of using git a bit more (I am aware of .gitignore and will be using it).
No github login credentials or deliberate sharing of any ssh keys or anything like that, certainly not intentional.
With "the cloud: it's not so much a concern of a targeted attack or anything like that, but just a leaking of information, say through an app that may have too much privilege or a little more scope than what I intended. And just about learning better practices.
For the time being I have independent files on the devices, but this project is going to get bigger (hopefully) and so I might move development to an actual computer as I am always hampered by doing real coding on the ipad. I DO do it, but it's just never great.
For the time being I just have a single
import
which has the credentials on the device itself, ie not in the cloud. It's probably better that way :) -
madivad
ahh no worries then.
What's the best way to "secure" these keys to be used by multiple devices?
Obviously importing them from another file from the cloud means they are "on the cloud".
Can python scripts in the Cloud data area access scripts on your device area?
I think I'll probably just include a key script file on each device, I'm guessing that's the norm? I don't plan to distribute that file off my device, should I be concerned about encrypting it?
-
madivad
What’s the best way to use environment variables for Pythonista? And how do I set them in the first place? I’m looking to not store an api key in a file if I can avoid it. I’ve been all through the settings and I nothing jumped out at me.
I do realise I could import keys from an external file but I’m surprised I haven’t seen anything specific for Pythonista since we don’t have that level of customisation with our (i)OS :)
-
madivad
@bennr01 That is a brilliant and well constructed reply. Great work.
-
madivad
I’d forgotten about your repos!
I ended up working it out, for me it’s the custom dialog where the control is misaligned, with the inbuilt control it aligns correctly
Edit: just confirmed, I downloaded that git, comment out line 89 (and join 90 back to the end of 89) and then edit the 'diag' at the end of the doc from:
diag = dialogs.form_dialog(title = 'Form Dialog', sections=form_list_of_sections)
To
diag = my_form_dialog(title = 'Form Dialog', sections=form_list_of_sections)
And run that on a smaller screen
-
madivad
I think I may have solved this issue...
I’ve created dozens of files over the last couple of weeks trying to get to the bottom of this. But syncing between the iPad and iPhone has just stopped working for pythonista (only, everything else has been fine)
It IS a shame pythonista doesn’t have a “pull down” refresh option at the top of the iCloud folder, but what I have found is that if I go to the file explorer on the left and go down to “Open External” and then select files (as opposed to folder, it’s not guaranteed to work there), I can see all the files, even newly created files on either device. The iCloud folder in that location is up to date, it’s just that pythonista’s version of it hasn’t refreshed (at least in my case) for whatever reason...
But now, after having done that, it seems this may be fixed! So far so good!
-
madivad
@cvp just because this has got a little disjointed and long and a few edits have been made here and there, could you paste the entire source in the next response please?
I’m about to test something else, downloading pythonista on one of my old phones... I want to rule something out :)
-
madivad
@cvp yeah that’s it, from your previous post (before this one) I went looking and did find it...
Yeah, they are both set to push, I was kinda hopeful for a moment that was the problem, but it does not appear so... :(
-
madivad
@cvp amazing content as usual! That is cool (the images).
Something interesting, what happens when you run one of these on your phone? For me, the segmented control is largely off the screen (form/dialog).