LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Digital Ocean API, and an IdeDigital Ocean API (https://www.linuxquestions.org/questions/programming-9/digital-ocean-api-and-an-idedigital-ocean-api-4175554741/)

hunterjoz1996 09-28-2015 05:06 PM

Digital Ocean API, and an IdeDigital Ocean API
 
Hi gang. I was looking at the Digital Ocean API not too long ago, and I am a bit stuck on logistics. I intend to allow the user to edit and maintain their droplets and view their account, but I am a bit stuck on how to get them to make a token for the API to work? Do I pop open the set browser and have them do it from their? Or do I just have them give me a username and have no password (I don't remember if a password is required for usage with the API if no tokens are used). Furthermore, how can I manage the token? I was thinking of making a .config/tokenfile, but that doesn't seem too wise from a security standpoint (the token can be lost, the token can be stolen...). Secondly, how does one use JSON and REST with Python? Would it be logical to put all the code logic in to one file, or can this be broken up, say, in two parts: one to do all the REST and JSON things and another to allow for the usage of the application? Sorry fi I seem a bit confused and scatterbrained; this is my first real project that I am embarking on after my first hackathon experience, and I have since figured out I have a lot to learn and a short amount of time to do it.


All times are GMT -5. The time now is 06:05 AM.