Jump to content

Python Help


tycoonlover1359

Recommended Posts

Hey,
 

First Thing

Firstly, I'm still a little (...ok, very) confused about how to trigger scripts in 
 

/username/public_html/cgi-bin

 
 when going to 
 

main-domain.heliohost.org/ 

or any other directory that isn't "cgi-bin/". I attempted to use the replicate the "extra" bit at the end of the Python tutorial on the wiki, however this didn't work and I'm still just getting Apache's regular "Index of <directory path>" directory explorer page when going to my website, instead of "Heliohost rules!" like what I'm expecting.
 
 

 

Though I might just move over to Flask ask this point...  :mellow:

 

 

 

Second Thing

Secondly, what's the best way to utilize 'secure' APIs (i.e., any API that requires something such as an "Authorization: Bearer <API Key>" header) while reducing the likelihood that API credentials would be exposed to the public either through the regular browser window or developer tools built into browsers (developer tools being things such as Chrome DevTools, which is the "Inspect Element" tool among others built into Chrome)?

 

I want to avoid exposing any API credentials to the public as best I can, and I'm not sure what the best and/or most secure way of doing this is (whether that be putting a .env file into the cgi-bin directory and then utilizing that (which doesn't seem to be a very secure solution, to my eye anyway), or somehow invoking scripts which aren't are descendant of /public_html/, which I'm still not sure how to do, or something else).

 

This leads me on to my next point...

 

Third Thing

 

Thirdly, can the Amazon AWS Boto3 SDK for Python (and its required packages, of course) be installed on Tommy? The Pypi page for Boto3 lists Python 3.7 as a compatible version of Python (I think, anyway), so, barring memory and CPU constraints (which I don't think should be a problem given, but I'm not sure of this), this should be fine for usage on Tommy.

 

(Given that this isn't already on Tommy, I seem to be the only one who wants the Boto3 SDK, so I'll explain myself as to why I want it. Also, now you see why I want to know the best way of utilizing 'secure' APIs in scripts.)

 

My main reason for wanting the Boto3 SDK is so that I can utilize (likely more powerful) AWS services within my web pages, thereby allowing me to do much more powerful operations whilst, in theory, still keeping my share of Tommy's load fairly minimal.

 

After thinking about this for a few minutes before posting this, utilizing AWS in this way should allow for more powerful operations to occur without causing too much strain on Tommy, since, to me anyway, there's a quite large load difference between having Tommy wait for an HTTP response from AWS and having Tommy, for example, calculate 100,000 rounds of a SHA-256 hash. (Though I don't know whether or not the memory used up by the Boto3 SDK would eat up, or overtake, the savings of utilizing AWS services over having Tommy do these things on its own; thereby reducing (or completely defeating) the purpose of moving intensive operations to AWS. I also don't really know what latency would be like, though page loading would certainly be slower than if Tommy did things on its own.)

 

Moved to: https://www.helionet.org/index/topic/40647-install-aws-boto3-sdk-for-python-on-tommy/

 

 

Thanks for the help (and for reading my, somewhat famous, long walls of text I seem post on every forum I post stuff in...)!

~Tycoon

 

 

 

Edit 2020-08-03 @ 11:18 PM (UTC-8:00):

It's perfectly fine if Boto3 can't be installed on the server for one reason or another. I do know how to make requests to AWS service endpoints 'manually', so-to-speak, so it isn't a huge deal if Boto3 can't be installed--I'd just prefer to not need to 'manually' make requests if I can use the official SDK, which handles making requests.

 

 

 

 

 

Edit 2020-08-05 @ 9:35 PM (UTC-8:00):

Moved the third point to its own Customer Service topic: https://www.helionet.org/index/topic/40647-install-aws-boto3-sdk-for-python-on-tommy/

 

 

Edited by tycoonlover1359
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...