"Push your work my little piscinner" - Drop, probably.
The purpose of this project is to create a python script that uses 42's API to return a random students login and location in the selected campus and cluster.
Running the script with no Command Line Arguments will retrieve you a user from 42 Lisboa's campus at Cluster 1 that is currently active. Alternativelly, if you'd like to select a specific campus or cluster you can run
randominette -s
Flag | Use |
---|---|
-s | Will allow you to specify a cluster and a campus |
-r | Will give you a whole row of victims |
Besides those defined in the requirements.txt file, you must have set the following two environment variables:
Variable | Expansion |
---|---|
42-UID | The UID provided by 42's platform |
42-SECRET | The Secret token provided by 42's platform |
If you're having trouble a .env file should do the trick.
Since we're all (the three of us) new to Pythonπ, here are some helpful resources:
Subject | Link |
---|---|
Python for C Programmers | CS50 40-minute semminar to learn the basics of Python for those proficient in C. |
Virtual Environments | Documentation and Youtube tutorial. |
Requests Library | We access the API via HTTP requests. There is a library that makes it very "user-friendly". |
Decouple Library | We store our tokens in a .env file so that we don't share them in our code. That is done with the Decouple library. |
42's API | We can access all loads of 42 stuff via its API. |
OAUTH2 | 42's API uses OAUTH2 for authentication. You can learn about OAUTH2 here and about its specific implementation in 42's API here. |