Kevin:tm:, a brand new social!
Once gone to /api
, you just have to create a python venv, install dependencies and create a new file, application/passwords.py
, which must contain a function called hash_password
, that requires a string and returns another, like this:
from hashlib import sha256
def hash_password(password):
return sha256(password.encode('utf-8')).hexdigest()
Example Installation (Linux):
cd api/
# Creates venv
python3 -m venv env
# Installs dependencies
source env/bin/activate
pip install -r requirements.txt
# Creates a password hasher
printf "from hashlib import sha256\n\ndef hash_password(password):\n return sha256(password.encode('utf-8')).hexdigest()\n" > application/passwords.py
Example Installation (Windows):
cd api/
# Creates venv
python3 -m venv env
# Installs dependencies
env\\Scripts\\activate.bat
pip install -r requirements.txt
# Creates a password hasher
printf "from hashlib import sha256\n\ndef hash_password(password):\n return sha256(password.encode('utf-8')).hexdigest()\n" > application/passwords.py
Again, the commands to run are still the same: create a venv and install dependencies.
Example Installation (Linux):
cd website/
# Creates venv
python3 -m venv env
# Installs dependencies
source env/bin/activate
pip install -r requirements.txt
Example Installation (Windows):
cd website/
# Creates venv
python3 -m venv env
# Installs dependencies
env\\Scripts\\activate.bat
pip install -r requirements.txt
You can easily run apis just by typing python3 run.py
, once loaded the venv.
For default, it loads
ProductionConfigs
: to loadTestingConfigs
just set theTESTING
variable totrue
(for more informations see api/application/configs.py).
python3 run.py
. Rememer to activate the venv first.
If you want to contribute to this open source project, you're free to pull-request us! We'll check your submission as soon as we can.
- Parri Gianluca - The guy who developed APIs. Also called Dr. Bee. - @gianluparri03
- Andreanelli Tommaso - The guy who routed the routes (Website) - @TommyAnd
- Mariotti Giuseppe - Frontender - @Caesar-7
- Bartocetti Enrico - Frontender v2.0 (also called the one in love with Bootstrap:tm:) - @EnryBarto
Click on this link to see the list of contributors who participated in this project.