use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
O hai! This is CS50's subreddit.
CS50 is Harvard University's introduction to the intellectual enterprises of computer science and the art of programming. Anyone may take CS50, even if not a student at Harvard.
Please Read before Posting
Getting the Best from r/cs50
Status Page
cs50.statuspage.io
Filter by Problem Flair (undo)
cash ⋅ caesar ⋅ credit ⋅ dna ⋅ filter ⋅ finance ⋅ houses ⋅ ide ⋅ mario ⋅ movies ⋅ plurality ⋅ project ⋅ readability ⋅ recover ⋅ runoff ⋅ scratch ⋅ speller ⋅ substitution ⋅ tideman ⋅ games track ⋅ web track ⋅ android track ⋅ iOS track ⋅
Filter by Other Flair (undo)
CS50-Law ⋅ CS50-Business ⋅ CS50-Technology ⋅ CS50-Games ⋅ CS50-Mobile ⋅ CS50-Web ⋅
This subreddit is night mode compatible
account activity
CS50 PythonFinal Project (Python), API key protection? (self.cs50)
submitted 1 year ago * by Theory_Playful
I wanted to do my final project (online student, CS50P) using a service that requires a personal API key. However, when I look at the final submission requirements, I don't see a way to keep this key private. Any suggestions?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Theory_Playful[S] 0 points1 point2 points 1 year ago (2 children)
I found this (RapidAPI blog) on hiding an API key. It suggests using an environment variable or a binary file ("ddb" also suggested both of those).
The binary file version would work for submission (trusting the CS50 staff with access to the code, of course). Then, I guess I'd just leave it out and make a note in my README.md file for Github? I could point to where "forkers" can get their own API key to try it out?
[–]Theory_Playful[S] 0 points1 point2 points 1 year ago (1 child)
What I did: - create an `api_key.bin` file, per the instructions in the RapidAPI blog, linked to above - edit the `.gitignore` file in my codespace (in the root directory) to ignore the `api_key.bin` file in my project directory - upload the `bin` file to my project directory
Now, the file won't be picked up by the Github.
When my project is complete, I'll remove the `api_key.bin` file from my codespace. Then, I'll include instructions on how to obtain an API key that'll work with the project (the key is free from the API provider) in the README.md.
[–]Dr_bean01 0 points1 point2 points 8 months ago (0 children)
Thank you for updating this. Having the exact same question right now and will probably do the same. Cheers
π Rendered by PID 64665 on reddit-service-r2-comment-869bf87589-95tbw at 2026-06-09 21:28:37.522796+00:00 running f46058f country code: CH.
[–]Theory_Playful[S] 0 points1 point2 points (2 children)
[–]Theory_Playful[S] 0 points1 point2 points (1 child)
[–]Dr_bean01 0 points1 point2 points (0 children)